Skip to content

America/Indiana/Indianapolis timezone does not display correctly #1260

Description

@mieszko4

What happens

For America/Indiana/Indianapolis, get_timezone_name returns GMT-05:00/GMT-04:00

Expected

For America/Indiana/Indianapolis, get_timezone_name should return Eastern Standard Time/Eastern Daylight Time

This broke after upgrading babel to 2.18.0. It works as expected on 2.17.0.
From my finding there is no key in Locale's timezones

Test script

from datetime import datetime
import zoneinfo
from babel import dates

iana_id = "America/Indiana/Indianapolis"
target_date = datetime(2025, 7, 1, 12, 0, 0) # July 1st, 2025
localized_dt = target_date.replace(tzinfo=zoneinfo.ZoneInfo(iana_id))
full_name = dates.get_timezone_name(localized_dt, locale='en_US', width='long')

print(f"Specific Name: {full_name}")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions