Skip to content

time.strftime("%Z") prints the .NET zone display name ("Eastern Daylight Time"), not python's abbreviation ("EDT") #2134

Description

@antonsynd

Found by /verify-implementation plan-0ca7b7 (2026-09-26), measured @ 61bf20f with the built sharpyc; pre-existing at BASE acd1d40 unless noted.

import time; print(time.strftime("%Z")): python3 prints EDT and Sharpy prints Eastern Daylight Time (host America/New_York). Since 0eca2b3, time.strftime goes through Strftime.cs's platform pass with the host zone for %z/%Z. The %Z name comes from TimeZoneInfo.DaylightName/StandardName, which is the Windows-style display name, while python uses libc tzname (the abbreviation). Also affects time.tzname if it exists. The IANA abbreviation isn't exposed by TimeZoneInfo, so this needs a design choice (the libc tzname via interop, or a tzdb abbreviation table).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    lane:silent-wrongCompiles and runs with wrong output or semantics (rank first)reach:programAn ordinary program a Python programmer would write hits it

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions