In John Skeet's blog post about handling timezone information when storing future datetimes, he suggests storing the version of timezone rules in the database along with the local time and timezone id.
His example:
ID: 1
Name: KindConf
LocalStart: 2022-07-10T09:00:00
Address: Europaplein 24, 1078 GZ Amsterdam, Netherlands
TimeZoneId: Europe/Amsterdam
UtcStart: 2022-07-10T07:00:00Z
TimeZoneRules: 2019a
In python, how do you get the version of timezone rules used by datetime? For example:
date.astimezone(zoneinfo.ZoneInfo('US/Pacific'))