Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UTC vs GMT #5497

Closed
robertbastian opened this issue Sep 5, 2024 · 2 comments
Closed

UTC vs GMT #5497

robertbastian opened this issue Sep 5, 2024 · 2 comments
Assignees
Labels
2.0-breaking Changes that are breaking API changes C-datetime Component: datetime, calendars, time zones C-time-zone Component: Time Zones

Comments

@robertbastian
Copy link
Member

UTC has been widely embraced by most countries and is the effective successor to Greenwich Mean Time (GMT) in everyday usage and common applications.

Yet ICU4X uses GMT, both on APIs (icu::timezone::GmtOffset) as well as in output ("GMT-05:00"). The latter is dictated by UTS 35, which seems to have historically used GMT, but currently uses GMT and UTC interchangeably. Unfortunately CLDR data has fields like gmtFormat (instead of a more neutral offsetFormat), which naturally result in values like GMT{0} instead of the more appropriate UTC{0}.

I do want to address this on the CLDR level, but this issue should discuss updating IUC4X APIs to use the more appropriate UTC. IXDTF and ISO 8601 also use "UTC offset" terminology, which already appears in ICU4X as well (e.g. through the beautifully named GmtOffset::try_from_utc_offset_record).

My concrete proposal for ICU4X is:

  • Rename GmtOffset -> UtcOffset
  • Rename datetime APIs like NeoTimeZoneGmtMarker to a more neutral NeoTimeZoneOffsetMarker, but document it as "UTC offset"
@robertbastian robertbastian added discuss-priority Discuss at the next ICU4X meeting 2.0-breaking Changes that are breaking API changes C-datetime Component: datetime, calendars, time zones C-time-zone Component: Time Zones labels Sep 5, 2024
@robertbastian
Copy link
Member Author

More from Wikipedia:

On 1 January 1972, GMT as the international civil time standard was superseded by Coordinated Universal Time (UTC), maintained by an ensemble of atomic clocks around the world.

The term "GMT" is also used as one of the names for the time zone UTC+00:00

English speakers often use GMT as a synonym for UTC.

The term "GMT" should thus not be used for purposes that require precision.

@sffc
Copy link
Member

sffc commented Sep 5, 2024

  • @sffc - I agree that we should probably use UTC more consistently. Is there a risk that CLDR adds different transliations for UTC?
  • @robertbastian - UTS 35 already uses them interchangeably
  • @hsivonen - UTC has leap seconds, and software doesn't typically handle them.
  • @robertbastian - It's correct for time zones because time zones are defined in terms of UTC, not GMT. And we're not doing maths, we're just displaying things, so leap seconds don't really matter
  • @nekevss - Typically I prefer UTC, but I understand if you want to align with CLDR
  • @robertbastian - For some things, we should just use "offset", not "GMT offset".
  • @sffc - Should we name the struct just "Offset" or maybe "ZoneOffset"?
  • @robertbastian - It is the UTC offset in this context.
  • @nekevss - Do we care about the difference between -0 and +0 in the UtcOffset type?
  • @robertbastian - Sounds like a parsing thing
  • @sffc - I also think it's an IXDTF thing

Conclusion: move forward with the suggestions in the OP

LGTM: @sffc @robertbastian @Manishearth @nekevss

@sffc sffc removed the discuss-priority Discuss at the next ICU4X meeting label Sep 5, 2024
@sffc sffc added this to the ICU4X 2.0 ⟨P1⟩ milestone Sep 5, 2024
@sffc sffc added this to icu4x 2.0 Sep 5, 2024
@sffc sffc moved this to Unclaimed for sprint in icu4x 2.0 Sep 5, 2024
@robertbastian robertbastian self-assigned this Sep 5, 2024
robertbastian added a commit that referenced this issue Sep 6, 2024
@github-project-automation github-project-automation bot moved this from Unclaimed for sprint to Done in icu4x 2.0 Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0-breaking Changes that are breaking API changes C-datetime Component: datetime, calendars, time zones C-time-zone Component: Time Zones
Projects
Status: Done
Development

No branches or pull requests

2 participants