croncpp icon indicating copy to clipboard operation
croncpp copied to clipboard

Time zones / daylight savings time?

Open HunterZ opened this issue 2 years ago • 3 comments

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 avatar Jul 03 '23 00:07 HunterZ

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

HunterZ avatar Jul 03 '23 00:07 HunterZ

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

nminkov avatar Sep 11 '23 20:09 nminkov