pytz icon indicating copy to clipboard operation
pytz copied to clipboard

timezone("CET") returns wrong offset

Open pmikh opened this issue 11 months ago • 2 comments

Hi, I've encountered the following bug in the latest version of the pytz.

version: pytz==2024.2

steps to reproduce:

offset = pytz.timezone("CET")
print(offset)

output:

Image

The offset is +18 minutes instead of expected +1.

pmikh avatar Jan 24 '25 13:01 pmikh

We also see the same issue in pytz 2025.1 and 2025.2. Circumvention for us is to exclude the pytz versions that have the issue: 2024.2, 2025.1, 2025.2

Can anyone please have a look at this?

andy-maier avatar Jul 22 '25 15:07 andy-maier

If you think a timezone definition is incorrect, I probably can’t fix it. pytz is a direct translation of the Olson timezone database, and changes to the timezone definitions need to be made to this source. If you find errors they should be reported to the time zone mailing list, linked from http://www.iana.org/time-zones.

from https://pythonhosted.org/pytz/

Guess here is the wrong place to ask about a fix?

CarliJoy avatar Aug 01 '25 13:08 CarliJoy