Skip to content

Conversation

yumaoka
Copy link
Member

@yumaoka yumaoka commented Sep 14, 2025

Checklist

  • Required: Issue filed: ICU-23157
  • Required: The PR title must be prefixed with a JIRA Issue number. Example: "ICU-1234 Fix xyz"
  • Required: Each commit message must be prefixed with a JIRA Issue number. Example: "ICU-1234 Fix xyz"
  • Issue accepted (done by Technical Committee after discussion)
  • Tests included, if applicable
  • API docs and/or User Guide docs changed or added, if applicable


if (offset == 0) {
// Not using GMT zero format when long (ICU-23157)
if (offset == 0 && isShort) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we also changed the spec for short, usage of this format should be completely gone.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I attended the meeting, I thought the conclusion was not to use gmtZeroFormat for long localized GMT format, and use it only short localized GMT format, which is designed to display it in shortest form. Were there any updates since then?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm no longer attending CLDR-TC. If the spec was updated, please clarify this in the ICU ticket please.
I checked LDML changes. it looks the implementation note part was dropped, but the spec for gmtZeroFormat is still left in LDML.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, I now understand what's happening. I can update the code again.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated this PR. No longer use GMT zero format.
For now, we still keep APIs related to GMT zero format. We need API change request because these API are already public @stable. These API should be deprecated, but it's too late for ICU 78.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the ticket, I noted this as coming from @sffc:

GMT short format already omits trailing “:00”; for offset 0 it shows “GMT”

I don't have enough context for whether this means that the short format should continue to use the "GMT zero format". @macchiati @pedberg-icu

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the current state of the PR, I see that we used to output "GMT", and now we get short="GMT+0" and long="GMT+00:00". ok for short?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a bit confusing, but Europe/London winter time in English may still emit "GMT" with pattern "z". This is because CLDR en.xml has short standard name for metazone GMT.

			<metazone type="GMT">
				<long>
					<standard>Greenwich Mean Time</standard>
				</long>
				<short>
					<standard>GMT</standard>
				</short>
			</metazone>

For other locales, pattern "z" may emit "GMT+0", but this is a fallback localized GMT offset format when short standard name for metazone GMT is missing in a locale.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm aware. We could remove the short name, so that z produces "GMT+0" and v produces "London Time"

@jira-pull-request-webhook
Copy link

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

@yumaoka yumaoka changed the title ICU-23157 Do not use GMT Zero Format (e.g. GMT) for long localized ti… ICU-23157 Do not use GMT Zero Format Sep 23, 2025
@sffc
Copy link
Member

sffc commented Sep 23, 2025

The only source of truth for the decision is Rob's comment here: https://unicode-org.atlassian.net/browse/CLDR-18280?focusedCommentId=181756

Design WG recommendation:

Don’t use gmtZeroFormat anywhere, so we’ll have

O => GMT+0, GMT+5, GMT+5:30

OOOO => GMT+00:00, GMT+05:00, GMT+05:30

If I or anyone else said anything contradictory to that, the Design WG recommendation trumps it.

@markusicu
Copy link
Member

The only source of truth for the decision is Rob's comment here [...]
If I or anyone else said anything contradictory to that, the Design WG recommendation trumps it.

thanks for checking!

@yumaoka yumaoka merged commit fff7c58 into unicode-org:main Sep 24, 2025
103 checks passed
@yumaoka yumaoka deleted the icu-23517-gmt-zero branch September 24, 2025 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants