develooper Front page | perl.perl5.porters | Postings from October 2003

Re: [perl #24372] Errors in gmtime() and localtime()

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
October 31, 2003 04:01
Subject:
Re: [perl #24372] Errors in gmtime() and localtime()
Message ID:
20031031120110.2602.6@llama.elixent.com
Derek@Dongray.Fsnet.Co.Uk <perl5-porters@perl.org> writes:
># New Ticket Created by  derek@dongray.fsnet.co.uk 
># Please include the string:  [perl #24372]
># in the subject line of all future correspondence about this issue. 
># <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24372 >
>
>
>
>This is a bug report for perl from derek@dongray.fsnet.co.uk,
>generated with the help of perlbug 1.34 running under perl v5.8.1.
>
>
>-----------------------------------------------------------------
>[Please enter your report here]
>
>At 00:35:26 31 oct 2003 GMT, the one-liner:
>
>perl -e '@l=gmtime();for(@l){print;print qq{ }}'
>
>produces:
>
>26 35 0 31 9 103 5 303 0 
>
>I.e. the year is returned as 103 instead of 2003.

As it is spec'ed to do - it isn't year but (year-1900) this is
a UNIX/POSIX standard




>localtime() produces the same result.
>
>The result is also reproduced on a version 5.8.0 build
>from Activestate running on XP.
>
>
>[Please do not change anything below this line]
>-----------------------------------------------------------------
>---
>Flags:
>    category=core
>    severity=low
>---
>Site configuration information for perl v5.8.1:
>
>Configured by derek at Sat Oct 18 15:47:29 BST 2003.
>
>Summary of my perl5 (revision 5.0 version 8 subversion 1) configuration:
>  Platform:
>    osname=linux, osvers=2.4.8-34.1mdksmp, archname=i586-linux
>    uname='linux mizar.inverchapel 2.4.8-34.1mdksmp #1 smp mon nov 19 11:10:36 mst 2001 i586 unknown '
>    config_args=''
>    hint=recommended, useposix=true, d_sigaction=define
>    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
>    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
>    use64bitint=undef use64bitall=undef uselongdouble=undef
>    usemymalloc=n, bincompat5005=undef
>  Compiler:
>    cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
>    optimize='-O2',
>    cppflags='-fno-strict-aliasing -I/usr/local/include'
>    ccversion='', gccversion='2.96 20000731 (Mandrake Linux 8.1 2.96-0.63.1mdk)', gccosandvers=''
>    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
>    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
>    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
>    alignbytes=4, prototype=define
>  Linker and Libraries:
>    ld='cc', ldflags =' -L/usr/local/lib'
>    libpth=/usr/local/lib /lib /usr/lib
>    libs=-lnsl -ldl -lm -lcrypt -lutil -lc
>    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
>    libc=/lib/libc-2.2.4.so, so=so, useshrplib=false, libperl=libperl.a
>    gnulibc_version='2.2.4'
>  Dynamic Linking:
>    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
>    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
>
>Locally applied patches:
>    
>
>---
>@INC for perl v5.8.1:
>    /usr/local/lib/perl5/5.8.1/i586-linux
>    /usr/local/lib/perl5/5.8.1
>    /usr/local/lib/perl5/site_perl/5.8.1/i586-linux
>    /usr/local/lib/perl5/site_perl/5.8.1
>    /usr/local/lib/perl5/site_perl
>    .
>
>---
>Environment for perl v5.8.1:
>    HOME=/home/derek
>    LANG=en
>    LANGUAGE=en_GB:en
>    LC_COLLATE=en_GB
>    LC_CTYPE=en_GB
>    LC_MESSAGES=en_GB
>    LC_MONETARY=en_GB
>    LC_NUMERIC=en_GB
>    LC_TIME=en_GB
>    LD_LIBRARY_PATH (unset)
>    LOGDIR (unset)
>    PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games:/usr/sbin:/home/derek/bin
>    PERL_BADLANG (unset)
>    SHELL=/bin/bash


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About