Front page | perl.perl5.porters |
Postings from November 1999
[ID 19991103.010] bug in Localtime
From:
Rob van den Broeck
Date:
November 3, 1999 23:21
Subject:
[ID 19991103.010] bug in Localtime
Message ID:
210355C88854D111AD6F52544C00726728A6BA@edc-nts4.intraneta.edc
Dear reader,
I found a problem using the function localtime. Executing the below script
will give me a wrong value for $mon (10 i.s.o. 11):
($sec,$min,$hour,$day,$mon,$year,$wday,$yday,$isdst) = localtime(time) ;
printf "$year/$mon/$day\n";
printf "$hour:$min:$sec\n";
printf "$]\n";
output:
99/10/3
12:12:2
5.00503
using the functions date and time (MSDOS box under Windows NT 4)
Date: wo 03-11-1999
time: 12:12:02,32
Is this a bug in Perl ?
perl -V gives you:
Summary of my perl5 (5.0 patchlevel 5 subversion 03) configuration:
Platform:
osname=MSWin32, osvers=4.0, archname=MSWin32-x86-object
uname=''
hint=recommended, useposix=true, d_sigaction=undef
usethreads=undef useperlio=undef d_sfio=undef
Compiler:
cc='cl.exe', optimize='-O2 -MD -DNDEBUG -TP -GX', gccversion=
cppflags='-DWIN32'
ccflags ='-O2 -MD -DNDEBUG -TP -GX -DWIN32 -D_CONSOLE -DNO_STRICT
-DHAVE_DES_FCRYPT -DPERL_OBJECT'
stdchar='char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
alignbytes=8, usemymalloc=n, prototype=define
Linker and Libraries:
ld='link', ldflags ='-nologo -nodefaultlib -release -machine:x86'
libpth="C:\Perl\lib\core"
libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib
uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib
PerlCRT.lib
libc=C:\Perl\lib\CORE\PerlCRT.lib, so=dll, useshrplib=yes,
libperl=perlcore.lib
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release
-machine:x86'
Characteristics of this binary (from libperl):
Locally applied patches:
ActivePerl Build 519
Built under MSWin32
Compiled at Aug 12 1999 09:50:30
@INC:
c:/Perl/lib
c:/Perl/site/lib
.
Rob Van den Broeck
New EDC BV
e-mail: mailto:rbroeck@new-edc.nl
www : http://www.new-edc.nl
This email is confidential and intended solely for the use of the individual
to whom it is addressed. Any views or opinions expressed are solely those of
the author and do not necessarily represent those of New Europe Data Consult
BV (New EDC consists of two business units, EDC and OA). If you are not the
intended recipient, be advised that you have received this email in error
and that any use, dissemination, forwarding, printing, or copying of this
email is strictly prohibited.
If you have received this email in error please notify the New EDC I&S
Department by email to postmaster@europe-data-consult.nl, or alternatively
by telephone on +31 (0) 10 4132399
-
Report 19066
by H.Merijn Brand
-
[ID 19991103.010] bug in Localtime
by Rob van den Broeck