PYTZ python is incorrectly adjusting for daylight saving on timezone Mexico_City

95 views Asked by At

is PYTZ **incorrectly ** observing daylight saving for timezone Mexico_City ?

I think daylight saving is no longer observed in Mexico asper this article:

https://time.is/time_zone_news/changes_in_mexico_time_zones

tz = timezone("America/New_York")
d=datetime(2023, 7, 7, 12, 0)
dt = tz.localize(d)
mx = timezone("America/Mexico_City")
dtmx = dt.astimezone(mx)
dtmx

gives result:

'2023-07-07T10:42:26.546648-05:00'

whereas the expectation is:

'2023-07-07T9:42:26.546648-05:00'

0

There are 0 answers