Closed tribumirkov closed 1 year ago
Hey folks,
Mexico decided not to move any more to summer time from 2023 on (don't ask me why):
https://www.marca.com/mx/actualidad/2023/03/28/6423471a46163f89688b45c3.html
ZoneInfo should therefore be adjusted.
To reproduce the error:
from zoneinfo import ZoneInfo from datetime import datetime
utc = datetime.utcnow() mexican_zone = ZoneInfo('America/Mexico_City') local = utc.replace(tzinfo=timezone.utc).astimezone(mexican_zone) print(local)
Thank you!
ZoneInfo does not hard code the zones, they are provided by your operating system or tzdata
tzdata
Hey folks,
Mexico decided not to move any more to summer time from 2023 on (don't ask me why):
https://www.marca.com/mx/actualidad/2023/03/28/6423471a46163f89688b45c3.html
ZoneInfo should therefore be adjusted.
To reproduce the error:
from zoneinfo import ZoneInfo from datetime import datetime
utc = datetime.utcnow() mexican_zone = ZoneInfo('America/Mexico_City') local = utc.replace(tzinfo=timezone.utc).astimezone(mexican_zone) print(local)
Thank you!