At 02:55 PM 6/3/2002 -0400, Thomas R Wyant_III wrote:

>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

Tom, running the same Perl kit on OpenVMS Alpha 7.1, Multinet 4.3, I get:

$ create trw.tmp
 Exit 
$ perl -e "print scalar localtime ((stat 'trw.tmp')[9])"
Mon Jun  3 14:56:07 2002
$ show time
   3-JUN-2002 14:56:14

So I think that does narrow it down to your time configuration as you 
suspected.  One workaround might be to experiment with "use vmsish 'time'", 
though I think that would really just be dodging the problem rather than 
solving it. Perl uses the C RTL's stat() and doesn't tinker with the values 
it gets unless vmsish 'time' is in effect.  See

$ perldoc vmsish


>  "MULTINET_TIMEZONE" = "EST"

This may well be your problem.  I suspect you want "EDT" either there or in 
SYS$TIMEZONE_NAME.

There is a good bit of information on OpenVMS timekeeping in the OpenVMS FAQ 
at www.openvms.compaq.com.  HTH.


Reply via email to