From 7c2d97d939526ab3040e260e3fd2121c20f61af9 Mon Sep 17 00:00:00 2001 From: Owen Clarke Date: Sat, 25 Feb 2012 23:13:41 -0500 Subject: [PATCH] Unit Tests - Fixed 'witching hour' bug in unit tests that causes problems when run in assorted time zones. By using str2time to get the epoch value of a known local time, this should fix failures that occur. Signed-off-by: Paul Beckingham --- test/bug.before.t | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/bug.before.t b/test/bug.before.t index 41ba47d3b..c070ea3eb 100755 --- a/test/bug.before.t +++ b/test/bug.before.t @@ -28,6 +28,7 @@ use strict; use warnings; +use Date::Parse; use Test::More tests => 17; # Create the rc file. @@ -43,11 +44,11 @@ if (open my $fh, '>', 'before.rc') # Create some exampel data directly. if (open my $fh, '>', 'pending.data') { - # 1229947200 = 12/22/2008 - # 1240000000 = 4/17/2009 + my $timeA = str2time("2008-12-22 12:00:00"); + my $timeB = str2time("2009-04-17 12:00:00"); print $fh <