Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More on Timelocal library bug using perl compiler of Perl 5.005_03 #122

Closed
p5pRT opened this issue Jun 28, 1999 · 3 comments
Closed

More on Timelocal library bug using perl compiler of Perl 5.005_03 #122

p5pRT opened this issue Jun 28, 1999 · 3 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 28, 1999

Migrated from rt.perl.org#926 (status was 'resolved')

Searchable as RT926$

@p5pRT
Copy link
Author

p5pRT commented Jun 28, 1999

From Angela.Huang@ebay.sun.com

p2.pl

@p5pRT
Copy link
Author

p5pRT commented Jun 28, 1999

From Angela.Huang@ebay.sun.com

p3.pl

@p5pRT
Copy link
Author

p5pRT commented Feb 19, 2002

From The RT System itself

use Time​::Local;

sub calculateage{
#
# calculate the age of the patch according to current date
#
  $DAY = 24 * 60 * 60;
  %MONTHS = ( "Jan", 0,
  "Feb", 1,
  "Mar", 2,
  "Apr", 3,
  "May", 4,
  "Jun", 5,
  "Jul", 6,
  "Aug", 7,
  "Sep", 8,
  "Oct", 9,
  "Nov", 10,
  "Dec", 11 );
  ( $lmonth, $day, $year ) = split(/\//, $_[0]);
  $month = $MONTHS{$lmonth};
  $start = timelocal( 1, 1, 1, $day, $month, $year );
  $end = time;
print "testing​:start=$start,end=$end,day=$day,month=$month,yr=$year\n";
  $age = int( ( $end - $start ) / $DAY );
}

##==============================================
## BEGIN
##==============================================
#

@​home = ("couch", "chair");
#foreach $i (@​home) {
  &calculateage("May/04/99");
# }
#==============================================
# END
#==============================================

__END__

#!/bin/sh

LD_AOUT_PRELOAD=libperl.a ./perl -I. -Ilib utils/perlcc -o t1 -L . t1.pl && ./t1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant