What would be an easy way to get the time and date of the next time change for a given timezone (in my case US/Eastern) ? I'm hoping there's a better way than iterating over every date until the %Z changes.
Thanks
What would be an easy way to get the time and date of the next time change for a given timezone (in my case US/Eastern) ? I'm hoping there's a better way than iterating over every date until the %Z changes.
Thanks
I didn't find an easy way to do that, but since my goal was to schedule a lambda I've actually found a better way. AWS Schedules support the # wildcard to point to a specific instance of a day in a month :
cron(0 3 ? 11 1#1 *)
This will run at 3am on the first Sunday of November for example, which is what I wanted. Not related to python but just thought I'd share what I ended up going with