mariusbancila / croncpp

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

Time zones / daylight savings time? #34

Open HunterZ opened 1 year ago

HunterZ commented 1 year ago

Does croncpp operate relative to UTC, the system's local time zone, or something else? I'm not seeing anything about this in the documentation, and it's concerning because it absolutely matters when you're talking about scheduling against calendar-related attributes. I'm also seeing a lot of open issues regarding things like daylight savings time transitions (#8, #24, #30, #32) and/or time zones (#23).

I know a second-order dependency is probably undesirable, but I'm wondering if it might be worth using the Howard Hinnant date library (https://github.com/HowardHinnant/date) since it's meant to provide modern C++ tools that can help with these kinds of issues.

The C# Cronos library also has some good thoughts in the "Daylight Savings Time" section of its documentation: https://github.com/HangfireIO/Cronos/

HunterZ commented 1 year ago

Update: Looks like libcron also uses date, so there's an example for how to use it in a C++ cron library: https://github.com/PerMalmberg/libcron

nminkov commented 1 year ago

Hi devs. Can you please give us more info about UTC vs Local? Do you only work in UTC or can configure in both?