staticlibs / ccronexpr

Cron expression parsing in ANSI C
Apache License 2.0
150 stars 78 forks source link

cron_next returns past date on DST summer day #15

Closed traveneau closed 5 years ago

traveneau commented 6 years ago

I have set CRON_USE_LOCAL_TIME to use local time. I have set the POSIX string to simulate a summer time shift: today is Friday(5) August (8) and the POSIX string to have a time shift next night 'CET-1CEST,M8.1.6,M12.5.0/3' (check specifications here: https://www.ibm.com/developerworks/aix/library/au-aix-posix/index.html). My cron job expression is the following, aiming to set up a job every day at 00h05: '0 0 5 /1 *'. The cron_next function fails and returns a date in the past (1 day earlier). In general, I have found that during 24h (at least) close the DST time shift, the cron_next returns an earlier date. The issue is only seen on forward time shift (summer) and not on backward time shift (winter). Has anyone experienced this?

staticlibs commented 6 years ago

Hi, sorry, currently don't have cycles to dig this up, will happily accept a PR for this.

staticlibs commented 5 years ago

This issue was closed automatically with #20 merged, please re-open if problem persists.