mariusbancila / croncpp

A C++11/14/17 header-only cross-platform library for handling CRON expressions
MIT License
236 stars 68 forks source link

Fix for Bug in handling cronspecs with 31-day months #30 #31

Closed bahmanrafatjoo closed 1 year ago

bahmanrafatjoo commented 1 year ago

I believe the issue with 31 day months is actually more to do with the repeated use of std::mktime especially which the next cron event is so long into the future that the days and months need to be increased past a DST change. I've added a tm_isdst reset every time the day_of_month or month change to force mktime to reevaluate DST. Seems to work with all existing and new tests.