gorhill / cronexpr

Cron expression parser in Go language (golang)
683 stars 168 forks source link

timezone related error on DST on Next() #23

Open cshiong opened 7 years ago

cshiong commented 7 years ago

step to reproduce: 1.get first schedule time schedule= 2 02 fromTime=2016-03-12 02:03:00 -0800 PST call Next() return: 2016-03-13T01:02:00-08:00

  1. get next schedule time. use the Next() return time as new fromTime: 2016-03-13T01:02:00-08:00 call Next() again ,and return the same value as new fromTime: 2016-03-13T01:02:00-08:00

  2. repeat step 2 and infinity loop

abecciu commented 7 years ago

It's fixed in PR #17

cshiong commented 7 years ago

thanks, could you make it public so I can test it,

On Fri, Dec 9, 2016 at 6:52 PM, Augusto Becciu notifications@github.com wrote:

It's fixed in PR #17 https://github.com/gorhill/cronexpr/pull/17

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gorhill/cronexpr/issues/23#issuecomment-266174036, or mute the thread https://github.com/notifications/unsubscribe-auth/AH_TmSG9LDO19pu1dEdvjOL3iTc_ATTFks5rGhP1gaJpZM4LJf0k .

abecciu commented 7 years ago

It's public, just pull the branch into your repo.

cshiong commented 7 years ago

Thanks that I am doing now. will u still plan to merge to master? On Tue, Dec 13, 2016 at 10:11 AM Augusto Becciu notifications@github.com wrote:

It's public, just pull the branch into your repo.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gorhill/cronexpr/issues/23#issuecomment-266816101, or mute the thread https://github.com/notifications/unsubscribe-auth/AH_TmaVKhVNw5X4Rfr5IfcEK4SEqJUKtks5rHt_rgaJpZM4LJf0k .

cshiong commented 7 years ago

on this commit, I found a new error. seems all the job scheduled on DST start day will be scheduled at 3am (DSTFallFireLate). i assume it should be just that missing our jobs fall to early time. e.g schedule: 0 14 timezone: America/Los_Angeles fromTime: 2016-03-12 14:01:00 -0800 PST reschedule to: 2016-03-13T03:00:00-07:00 in the master version, it is set correct to 2016-03-13T14:00:00-07:00