[Info-vax] VMSperl's localtime function defect?
Heuser
vaxinf at chemie.uni-konstanz.de
Wed Jan 13 06:42:39 EST 2010
Hi,
I'm using the perl executable that comes with csws-apache-based
webserver.
The month reported seems to be wrong:
perl -version
This is perl, v5.8.6 built for VMS_IA64
(with 2 registered patches, see perl -V for more detail)
Copyright 1987-2004, Larry Wall
Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5 source
kit.
Complete documentation for Perl, including FAQ lists, should be found
on
this system using `man perl' or `perldoc perl'. If you have access to
the
Internet, point your browser at http://www.perl.org/, the Perl Home
Page.
x.pl:
=============================================================
use strict;
my ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat,
$Jahr, $Wochentag, $Jahrestag, $Sommerzeit) = localtime(time);
$Jahr+=1900;
my $datum1 = $Monatstag . '-' . $Monat . '-' . $Jahr;
my $uhrzeit = $Stunden . ':' . $Minuten;
print "$datum1\n";
=============================================================
$ perl x.pl
13-0-2010
$ sh tim
13-JAN-2010 12:37:24
Is it my fault or a bug?
Eberhard
More information about the Info-vax
mailing list