|
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 User : jackjohn ( 502) PHP Version : 5.3.17 Disable Function : NONE Directory : /installd/perl588installer/perl-5.8.8/lib/Time/ |
Upload File : |
#!./perl
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
}
BEGIN {
our $hasgm;
eval { my $n = gmtime 0 };
$hasgm = 1 unless $@ && $@ =~ /unimplemented/;
unless ($hasgm) { print "1..0 # Skip: no gmtime\n"; exit 0 }
}
BEGIN {
our @gmtime = gmtime 0; # This is the function gmtime.
unless (@gmtime) { print "1..0 # Skip: gmtime failed\n"; exit 0 }
}
print "1..10\n";
use Time::gmtime;
print "ok 1\n";
my $gmtime = gmtime 0 ; # This is the OO gmtime.
print "not " unless $gmtime->sec == $gmtime[0];
print "ok 2\n";
print "not " unless $gmtime->min == $gmtime[1];
print "ok 3\n";
print "not " unless $gmtime->hour == $gmtime[2];
print "ok 4\n";
print "not " unless $gmtime->mday == $gmtime[3];
print "ok 5\n";
print "not " unless $gmtime->mon == $gmtime[4];
print "ok 6\n";
print "not " unless $gmtime->year == $gmtime[5];
print "ok 7\n";
print "not " unless $gmtime->wday == $gmtime[6];
print "ok 8\n";
print "not " unless $gmtime->yday == $gmtime[7];
print "ok 9\n";
print "not " unless $gmtime->isdst == $gmtime[8];
print "ok 10\n";