Front page | perl.vmsperl |
Postings from June 2002
File mod date retrieval problem
Thread Next
From:
Thomas R Wyant_III
Date:
June 3, 2002 11:55
Subject:
File mod date retrieval problem
Message ID:
OFA0F8A099.853491C9-ON85256BCD.00658318@lvs.dupont.com
All,
I'm having a problem getting correct times from the stat () function under
Perl 5.6.1/OpenVMS/AXP 7.1-1H (details appended). I suspect a configuration
problem on the VMS system in question, but am out of places to look. A
quick demo:
$ perl -e "print scalar localtime"
Mon Jun 3 14:25:46 2002
$ create trw.tmp
Exit
$ perl -e "print scalar localtime ((stat 'trw.tmp')[9])"
Mon Jun 3 15:26:00 2002
$ sho tim
3-JUN-2002 14:28:13
$ dir/date=mod trw.tmp
Directory SYS$SYSDEVICE:[PERLBUILD]
TRW.TMP;1 0/0 3-JUN-2002 14:26:00.57
Total of 1 file, 0/0 blocks.
$
As you see, the Perl stat () function appears to be reporting a time an
hour later than the file was actually modified. The time (), localtime (),
and utime () functions appear to function normally. So did stat () until we
went to Daylight Savings time.
I am not the system manager for the system in question, so I can't say for
sure how the time change was done, and more to the point I have no say in
how it is done. What I BELIEVE was done was that a SET TIME was issued,
followed by a modification of SYS$TIMEZONE_DIFFERENTIAL. Later, I came
along and executed @sys$manager:utc$configure_tdf to set its offset to
-4:00. The TZ environment variable is not defined, and defining it appears
not to have any effect on this behaviour.
The Perl being used is built from Craig Berry's kit. Rebuilding from that
kit does not affect the problem, though to tell the truth I had no real
belief that it would.
At this point I'm prone to suspect the time change procedure, but in the
absence of documentation and a co-operating system manager I'm at a loss.
Suggestions appreciated.
Thanks,
Tom Wyant
PS - Selected other information:
$ pipe sho sys|grep uptime
OpenVMS V7.1-1H2 on node mynode 3-JUN-2002 14:42:49.52 Uptime 21 22:25:59
$ ! Note that the system _has_ been rebooted.
$ sho log *time*
<output edited for brevity>
(LNM$SYSTEM_TABLE)
"INTERNET_TIME_SOURCE" = "some.dotted.quad.address"
"MULTINET_TIMEZONE" = "EST"
"SYS$LOCALTIME" = "SYS$SYSROOT:[SYS$ZONEINFO.SYSTEM.US]EASTERN."
"SYS$TIMEZONE_DIFFERENTIAL" = "-14400"
$ perl "-V"
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
Platform:
osname=VMS, osvers=V7.1-1H2, archname=VMS_AXP
uname='VMS spafs2 V7.1-1H2 AlphaServer 4100 5/466 4MB'
config_args='-"des" -"Dcf_email=system"'
hint=none, useposix=false, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
Compiler:
cc='CC/DECC', ccflags ='/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoList',
optimize='',
cppflags='undef'
ccversion='50690003', gccversion='', gccosandvers='undef'
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='int', lseeksize=4
alignbytes=8, usemymalloc=N, prototype=define
Linker and Libraries:
ld='Link', ldflags ='/NoTrace/NoMap'
libpth=/sys$share /sys$library
libs=
perllibs=
libc=(DECCRTL), so=exe, useshrplib=undef, libperl=undef
Dynamic Linking:
dlsrc=dl_vms.c, dlext=exe, d_dlsymun=undef, ccdlflags=''
cccdlflags='', lddlflags='/Share'
Characteristics of this PERLSHR image:
Compile-time options: DEBUGGING
Built under VMS
Compiled at Dec 27 2001 19:10:59
%ENV:
PERLSHR="PERL_ROOT:[000000]PERLSHR.EXE"
PERL_ROOT="SYS$SYSDEVICE:[PERL.PERL-5_6_1.]"
@INC:
perl_root:[lib.VMS_AXP.5_6_1]
perl_root:[lib]
perl_root:[lib.site_perl.VMS_AXP]
perl_root:[lib.site_perl]
/perl_root/lib/site_perl
.
$
Thread Next
-
File mod date retrieval problem
by Thomas R Wyant_III