From 68fd2b282b3d533d323f316d100490d84e1083fd Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 31 Aug 2013 13:08:04 -0400 Subject: [PATCH] fixed time zone bug --- cronexpr.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cronexpr.go b/cronexpr.go index 0af7247..c5c417e 100644 --- a/cronexpr.go +++ b/cronexpr.go @@ -232,7 +232,7 @@ func (expr *Expression) nextYear(t time.Time) time.Time { expr.minuteList[0], expr.secondList[0], 0, - time.Local)) + t.Location())) } return time.Date( expr.yearList[i], @@ -242,7 +242,7 @@ func (expr *Expression) nextYear(t time.Time) time.Time { expr.minuteList[0], expr.secondList[0], 0, - time.Local) + t.Location()) } /******************************************************************************/ @@ -265,7 +265,7 @@ func (expr *Expression) nextMonth(t time.Time) time.Time { expr.minuteList[0], expr.secondList[0], 0, - time.Local)) + t.Location())) } return time.Date( @@ -276,7 +276,7 @@ func (expr *Expression) nextMonth(t time.Time) time.Time { expr.minuteList[0], expr.secondList[0], 0, - time.Local) + t.Location()) } /******************************************************************************/