Changeset 24912 for lang/perl/DateTime-Lite
- Timestamp:
- 11/26/08 14:17:34 (4 years ago)
- Files:
-
- 1 modified
-
lang/perl/DateTime-Lite/trunk/t/04epoch.t (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/DateTime-Lite/trunk/t/04epoch.t
r24440 r24912 3 3 use strict; 4 4 5 use Test::More tests => 28;5 use Test::More tests => 32; 6 6 7 7 use DateTime::Lite qw(Arithmetic); … … 90 90 is( $epochtest->epoch, $expected, 91 91 "epoch method returns correct adjusted value ($expected)"); 92 92 93 } 93 94 … … 104 105 is( $dt->nanosecond, 123_456_789, 'nanosecond should be an integer ' ); 105 106 } 107 108 my $negative_epoch_ok = defined( (localtime(-1))[0] ) ? 1 : 0; 109 110 SKIP: 111 { 112 skip 'Negative epoch times do not work on some operating systems, including Win32', 4 113 unless $negative_epoch_ok; 114 115 is( DateTime::Lite->new( year => 1904 )->epoch, -2082844800, 116 "epoch should work back to at least 1904" ); 117 118 my $dt = DateTime::Lite->from_epoch( epoch => -2082844800 ); 119 is( $dt->year, 1904, 'year should be 1904' ); 120 is( $dt->month, 1, 'month should be 1904' ); 121 is( $dt->day, 1, 'day should be 1904' ); 122 } 123
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)