[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
[ID 20000126.001] Erroneous date (Y2K) displayed by pod2man
This is a bug report for perl from mike@appius.se,
generated with the help of perlbug 1.26 running under perl 5.00502.
-----------------------------------------------------------------
[Please enter your report here]
When generating a man-page from a recently edited perl module
I noticed that the date read '26/Jan/100'.
Looking into pod2man I found the following function (linenumbers
have been prepended):
296 sub makedate {
297 my $secs = shift;
298 my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($secs);
299 my $mname = (qw{Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec})[$mon];
300 return "$mday/$mname/$year";
301 }
Looking into the perlfunc manpage it says that 'localtime' returns
the number of years since 1900, i.e. 100 for this year.
Either you should add 1900 to $year or maybe take $year modulo 100.
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Site configuration information for perl 5.00502:
Configured by edthavz at Tue Feb 2 17:29:58 MET 1999.
Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration:
Platform:
osname=solaris, osvers=2.6, archname=sun4-solaris
uname='sunos edt004 5.6 generic_105181-08 sun4u sparc sunw,ultra-1 '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
Compiler:
cc='/EDUP/Gcc/2.8.1/bin/gcc', optimize='-O', gccversion=2.8.1
cppflags=''
ccflags =''
stdchar='unsigned char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
alignbytes=8, usemymalloc=y, prototype=define
Linker and Libraries:
ld='/EDUP/Gcc/2.8.1/bin/gcc', ldflags =''
libpth=/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lc -lcrypt
libc=, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fPIC', lddlflags='-G'
Locally applied patches:
---
@INC for perl 5.00502:
/home/gps/Devenv/lib/perl5
/home/gps/Devenv/lib/perl5/site_perl/sun4-solaris
/home/gps/Devenv/lib/perl5/site_perl
/home/gps/Devenv/lib/perl5/site_perl/5.005/sun4-solaris
/home/gps/Devenv/lib/perl5/site_perl/5.005
/home/gps/Src/AdminTool/Delivery/external/admintool/lib/perl5/site_perl/5.005/sun4-solaris
/home/gps/Src/AdminTool/Delivery/external/admintool/lib/perl5/site_perl/5.005
/home/gps/Src/ERmark/Delivery/external/ermark/lib/perl5/site_perl/5.005/sun4-solaris
/home/gps/Src/ERmark/Delivery/external/ermark/lib/perl5/site_perl/5.005
/EDUP/Perl/5.005/lib/perl5/5.00502/sun4-solaris
/EDUP/Perl/5.005/lib/perl5/5.00502
/EDUP/Perl/5.005/lib/perl5/site_perl/5.005/sun4-solaris
y
.
---
Environment for perl 5.00502:
HOME=/home/qdtmibt
LANG=en_US
LC_COLLATE=en_US
LC_CTYPE=en_US
LC_MESSAGES=C
LC_MONETARY=en_US
LC_NUMERIC=en_US
LC_TIME=en_US
LD_LIBRARY_PATH=/home/qdtmibt/Devenv/lib:/home/qdtmibt/Devenv/lib:/EDUP/Apssystem/3.0/lib/runtime:/usr/dt/lib:/usr/openwin/lib:/usr/lib:/usr/ucblib:/usr/4lib
LOGDIR (unset)
PATH=/EDUP/Perl/5.005/bin:/usr/ccs/lib:/EDUP/SUNWspro/bin:/home/ias/ias/dist/IAS_R13C_SunOS5/bin:/opt/pub/bin:/home/qdtmibt/Devenv/bin:/EDUP/Emacs/20.2/bin:/EDUP/Apssystem/3.0/bin:/EDUP/Netscape/4.06:/EDUP/Frame/5.1/bin:/usr/dt/bin:/EDUP/Site/bin:/EDUP/Util/1.3/bin:/usr/openwin/bin:/bin:/usr/bin:/usr/ucb:.:/usr/ucb:/usr/ccs/bin:/usr/ucb:/usr/ccs/bin
PERL5LIB=/home/gps/Devenv/lib/perl5:/home/gps/Devenv/lib/perl5/site_perl:/home/gps/Devenv/lib/perl5/site_perl/5.005:/home/gps/Src/AdminTool/Delivery/external/admintool/lib/perl5/site_perl/5.005:/home/gps/Src/ERmark/Delivery/external/ermark/lib/perl5/site_perl/5.005
PERL_BADLANG (unset)
SHELL=/bin/tcsh
- Follow-Ups from:
-
Tom Christiansen <tchrist@chthon.perl.com>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]