From: Mike Rylander Date: Mon, 31 Jul 2017 19:15:02 +0000 (-0400) Subject: Revert "LP#1635737: Unit tests for DST and date math" X-Git-Tag: osrf_rel_3_0_0-alpha~17 X-Git-Url: http://git.equinoxoli.org/?p=opensrf-equinox.git;a=commitdiff_plain;h=0484c673577c49a552af861364caac03ef187f5e Revert "LP#1635737: Unit tests for DST and date math" This reverts commit 316f58375c40087bfae32234c4dd3817260831e5. --- diff --git a/src/perl/t/09-Utils-interval_to_seconds.t b/src/perl/t/09-Utils-interval_to_seconds.t index 2f82ea2..4328fe2 100644 --- a/src/perl/t/09-Utils-interval_to_seconds.t +++ b/src/perl/t/09-Utils-interval_to_seconds.t @@ -1,8 +1,6 @@ -#!perl +#!perl -T - -use DateTime::Format::ISO8601; -use Test::More tests => 10; +use Test::More tests => 9; BEGIN { use_ok( 'OpenSRF::Utils' ); @@ -14,14 +12,5 @@ is (OpenSRF::Utils::interval_to_seconds('1 hour'), 3600); is (OpenSRF::Utils::interval_to_seconds('1 day'), 86400); is (OpenSRF::Utils::interval_to_seconds('1 week'), 604800); is (OpenSRF::Utils::interval_to_seconds('1 month'), 2628000); - -# With context, no DST change -is (OpenSRF::Utils::interval_to_seconds('1 month', - DateTime::Format::ISO8601->new->parse_datetime('2017-02-04T23:59:59-04')), 2419200); - -# With context, with DST change -is (OpenSRF::Utils::interval_to_seconds('1 month', - DateTime::Format::ISO8601->new->parse_datetime('2017-02-14T23:59:59-04')), 2415600); - is (OpenSRF::Utils::interval_to_seconds('1 year'), 31536000); is (OpenSRF::Utils::interval_to_seconds('1 year 1 second'), 31536001);