taichino / croniter

croniter is a python module to provide iteration for datetime object.
http://github.com/taichino/croniter
387 stars 105 forks source link

Can croniter cron be set to a different TZ than the system? #175

Closed merc1031 closed 3 years ago

merc1031 commented 3 years ago

I beleive if the system TZ is set , ex TZ=America/Los_Angeles normal cron can be specificied like this 0 0 0 * * TZ="Etc/UTC" /do/command > /dev/null 2>&1 To treat the specific cron as if its in UTC time.

Is this something possible in the cron expression format of croniter?

kiorky commented 3 years ago

you may have a look to pytz and use a non-naive datetime.