summaryrefslogtreecommitdiff
path: root/t/precision.t
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2017-06-21 21:54:00 +0100
committerdakkar <dakkar@thenautilus.net>2017-06-21 21:54:00 +0100
commit65616d2ea5f7469103e660cd3a17cb2c1c065b1e (patch)
tree699b88e19316cc9cb90eb345a721028e51ec3e87 /t/precision.t
parentchangelog (diff)
downloadDateTime-Format-GeekTime-65616d2ea5f7469103e660cd3a17cb2c1c065b1e.tar.gz
DateTime-Format-GeekTime-65616d2ea5f7469103e660cd3a17cb2c1c065b1e.tar.bz2
DateTime-Format-GeekTime-65616d2ea5f7469103e660cd3a17cb2c1c065b1e.zip
fix slow tests
precision2.t only worked in 2010…
Diffstat (limited to 't/precision.t')
-rw-r--r--t/precision.t6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/precision.t b/t/precision.t
index 751e1d6..bc01821 100644
--- a/t/precision.t
+++ b/t/precision.t
@@ -10,9 +10,11 @@ else {
plan skip_all => 'Slow test, set $ENV{SLOW_TESTS} to run it';
}
+my $formatter= DateTime::Format::GeekTime->new(2010);
+
for my $i (0..65535) {
my $gkt=sprintf '0x%04X on day 0x000',$i;
- my $dt=DateTime::Format::GeekTime->parse_datetime($gkt);
- my $round_trip=DateTime::Format::GeekTime->format_datetime($dt);
+ my $dt=$formatter->parse_datetime($gkt);
+ my $round_trip=$formatter->format_datetime($dt);
is(substr($round_trip,0,19),$gkt);
}