Scheduled tasks and Daylight Saving Time

Last Sunday there was this year’s change from summer time (CEST) to winter time (CET). I have snapshots scheduled on Sundays at 02:00am and 02:30am. This time I got errors “can’t do snapshot - name already exists”. Then it dawned on me that the schedules are in local time and as the time zone changed the tasks got executed twice, since the timezone change always occurs between 02:00am and 03:00am.

Are there recommendations how to handle this? Maybe through a checkbox “Use UTC”?

Had an issue with posting, so re-posted…

I just experienced the same thing this morning.

Short answer:
Add “%z” to the naming convention of your scheduled tasks to include the timezone offset to the name.

Using EST/EDT for where I am:

snapshot-tenths-%Y-%m-%d_%H-%M_%z

becomes

snapshot-tenths-2024-11-03_07-50_-0500

I believe this will avoid duplicate names by changing the timezone offset accordingly, but I’ll find out for sure next time change!

Longer answer:
In Data Protection → Periodic Snapshot Tasks, when you are in a task configuration window there’s an information icon next to “Naming Schema”.

There’s a link to the strftim(3) man page

https://man7.org/linux/man-pages/man3/strftime.3.html

%z The +hhmm or -hhmm numeric timezone (that is, the hour and minute offset from UTC). (SU)
%Z The timezone name or abbreviation.

“%Z” was not accepted by TrueNAS, but “%z” worked.

Perhaps the default naming schema should include %z to avoid this issue