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

8340073: Support "%z" time zone abbreviation format in TZ files #20979

Closed
wants to merge 2 commits into from

Conversation

naotoj
Copy link
Member

@naotoj naotoj commented Sep 12, 2024

Yet another preparation for upgrading the time zone data to 2024b, which introduced a new abbreviation format "%z". The update includes:
...
The main source files' time zone abbreviations now use %z,
supported by zic since release 2015f and used in vanguard form
since release 2022b. For example, America/Sao_Paulo now contains
the zone continuation line "-3:00 Brazil %z", which is less error
prone than the old "-3:00 Brazil -03/-02". This does not change
the represented data: the generated TZif files are unchanged.
Rearguard form still avoids %z, to support obsolescent parsers.
...

Also fixed the logic to retrieve the linked tz name that is chaining.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8340073: Support "%z" time zone abbreviation format in TZ files (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/20979/head:pull/20979
$ git checkout pull/20979

Update a local copy of the PR:
$ git checkout pull/20979
$ git pull https://git.openjdk.org/jdk.git pull/20979/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 20979

View PR using the GUI difftool:
$ git pr show -t 20979

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/20979.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 12, 2024

👋 Welcome back naoto! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Sep 12, 2024

@naotoj This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8340073: Support "%z" time zone abbreviation format in TZ files

Reviewed-by: jlu, joehw, coffeys

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 52 new commits pushed to the master branch:

  • 59407fa: 8310525: DynamicLauncher for JDP test needs to try harder to find a free port
  • 89759c8: 8321935: Define the term 'standard doclet'
  • 65b9aba: 8339769: Incorrect error message during startup if working directory does not exist
  • 1640bd2: 8340186: Shenandoah: Missing load_reference_barrier_phantom_narrow match in is_shenandoah_lrb_call
  • 996790c: 8339954: Print JVMCI names with the Compiler.{perfmap,codelist,CodeHeap_Analytics} diagnostic commands
  • e1ebeef: 8340131: Refactor internal makeHiddenClassDefiner to take option mask instead of Set
  • 05b9d47: 8340194: Replace usage of -ms with -Xms in LauncherCommon.gmk make file
  • 5459518: 8339627: Cleanup Unsafe.setMemory intrinsic code
  • a4eb9a0: 8339918: Remove checks for outdated -t -tm -Xfuture -checksource -cs -noasyncgc options from the launcher
  • 6be15c3: 8340012: [C2] assert(KlassEncodingMetaspaceMax > pd) failed: change encoding max if new encoding after 8338526
  • ... and 42 more: https://git.openjdk.org/jdk/compare/35a94b769761bd923fe6db03be672f05c1a74c38...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 12, 2024
@openjdk
Copy link

openjdk bot commented Sep 12, 2024

@naotoj The following labels will be automatically applied to this pull request:

  • build
  • core-libs
  • i18n

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added build build-dev@openjdk.org core-libs core-libs-dev@openjdk.org i18n i18n-dev@openjdk.org labels Sep 12, 2024
@naotoj
Copy link
Member Author

naotoj commented Sep 12, 2024

/label remove build

@openjdk openjdk bot removed the build build-dev@openjdk.org label Sep 12, 2024
@openjdk
Copy link

openjdk bot commented Sep 12, 2024

@naotoj
The build label was successfully removed.

@mlbridge
Copy link

mlbridge bot commented Sep 12, 2024

Webrevs

Copy link
Member

@justin-curtis-lu justin-curtis-lu left a comment

Choose a reason for hiding this comment

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

IIUC we treat the %z FORMAT the same as the numeric offset FORMAT, that is we rely on the STDOFF to calculate the GMT format during runtime.
The changes in convertGMTName(String f) seem to accomplish that.

LocaleResources lr = LocaleProviderAdapter.forType(Type.CLDR).getLocaleResources(l);
ResourceBundle fd = lr.getJavaTimeFormatData();
var zi = ZoneInfoFile.getZoneInfo(id);
if (zi == null) {
Copy link
Member

Choose a reason for hiding this comment

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

This is an added fallback, and is not related to the "%z" logic right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Right. Since getZoneInfo() could return null, this is just for safety.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 16, 2024
Copy link
Contributor

@coffeys coffeys left a comment

Choose a reason for hiding this comment

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

LGTM

@naotoj
Copy link
Member Author

naotoj commented Sep 16, 2024

Thanks for the reviews!
/integrate

@openjdk
Copy link

openjdk bot commented Sep 16, 2024

Going to push as commit 418bb42.
Since your change was applied there have been 54 commits pushed to the master branch:

  • b26645f: 8339883: Open source several AWT/2D related tests
  • 858b4f1: 8339960: GenShen: Fix inconsistencies in generational Shenandoah behavior
  • 59407fa: 8310525: DynamicLauncher for JDP test needs to try harder to find a free port
  • 89759c8: 8321935: Define the term 'standard doclet'
  • 65b9aba: 8339769: Incorrect error message during startup if working directory does not exist
  • 1640bd2: 8340186: Shenandoah: Missing load_reference_barrier_phantom_narrow match in is_shenandoah_lrb_call
  • 996790c: 8339954: Print JVMCI names with the Compiler.{perfmap,codelist,CodeHeap_Analytics} diagnostic commands
  • e1ebeef: 8340131: Refactor internal makeHiddenClassDefiner to take option mask instead of Set
  • 05b9d47: 8340194: Replace usage of -ms with -Xms in LauncherCommon.gmk make file
  • 5459518: 8339627: Cleanup Unsafe.setMemory intrinsic code
  • ... and 44 more: https://git.openjdk.org/jdk/compare/35a94b769761bd923fe6db03be672f05c1a74c38...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 16, 2024
@openjdk openjdk bot closed this Sep 16, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 16, 2024
@openjdk
Copy link

openjdk bot commented Sep 16, 2024

@naotoj Pushed as commit 418bb42.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org i18n i18n-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants