python-babel / babel

The official repository for Babel, the Python Internationalization Library
http://babel.pocoo.org/
BSD 3-Clause "New" or "Revised" License
1.29k stars 433 forks source link

Timezone for `America/Montreal` display `-0400` instead of `EDT` or `EST` #1019

Open ikus060 opened 11 months ago

ikus060 commented 11 months ago

Overview Description

Using babel to format date with local timezone show different result for America/Montreal and America/Toronto.

Steps to Reproduce

>>> dates.format_datetime(format='long', tzinfo=pytz.timezone('America/Toronto'))
'August 2, 2023 at 1:27:22 p.m. EDT'
>>> dates.format_datetime(format='long', tzinfo=pytz.timezone('America/Montreal'))
'August 2, 2023 at 1:27:29 p.m. -0400'

Expected Results

America/Toronto and America/Montreal are always on the same timezone. So I'm expecting timezone to be displayed as EDT for America/Montreal.

Maybe an alias is missing ?

ikus060 commented 11 months ago

I also have similar issue with Europe/Zurich where it get displayed as +0200 instead of CEST

celbaz commented 9 months ago

I have noticed the same for all IST values "Asia/Kolkata"...