xref: /openbsd/gnu/usr.bin/perl/cpan/Time-Piece/t/01base.t (revision 891d7ab6)
1use Test::More tests => 7;
2
3BEGIN { use_ok('Time::Piece'); }
4
5my $t = gmtime(315532800); # 00:00:00 1/1/1980
6
7isa_ok($t, 'Time::Piece', 'specific gmtime');
8
9cmp_ok($t->year, '==', 1980, 'correct year');
10
11cmp_ok($t->hour, '==',    0, 'correct hour');
12
13cmp_ok($t->mon,  '==',    1, 'correct mon');
14
15my $g = gmtime;
16isa_ok($g, 'Time::Piece', 'current gmtime');
17
18my $l = localtime;
19isa_ok($l, 'Time::Piece', 'current localtime');
20