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

Update tzdb handling #789

Merged
merged 1 commit into from
Sep 15, 2024
Merged

Update tzdb handling #789

merged 1 commit into from
Sep 15, 2024

Conversation

jodastephen
Copy link
Member

@jodastephen jodastephen commented Sep 15, 2024

  • Update parser and tests to handle changes to TZDB data in 2024bgtz
  • WET, CET and EET European zones are repaired
  • MET zone is mapped to CET
  • American zones like EST will be auto-normalized

Summary by CodeRabbit

  • New Features

    • Improved handling of time zone aliases for better accuracy.
    • Enhanced control over logging output based on verbosity settings.
  • Bug Fixes

    • Updated unit tests to align with the "CET" time zone, ensuring accuracy in test results.

* Update parser and tests to handle changes to TZDB data
* WET, CET and EET European zones are saved
* MET zone is mapped to CET
* American zones like EST will be auto-normalized
Copy link

coderabbitai bot commented Sep 15, 2024

Walkthrough

Walkthrough

The changes involve modifications to the handling of time zone aliases in the ZoneInfoCompiler.java file, specifically refining the logic for adding aliases and improving debug logging output. Additionally, unit tests in the TestDateTimeFormatterBuilder class have been updated to replace references to "MET" with "CET", including renaming test methods and adjusting expected output strings to ensure alignment with the new time zone designation.

Changes

Files Change Summary
src/main/java/org/joda/time/tz/ZoneInfoCompiler.java Updated logic for time zone aliasing; improved debug logging control.
src/test/java/org/joda/time/format/TestDateTimeFormatterBuilder.java Renamed test methods from "MET" to "CET" and updated assertions to reflect the new time zone.

Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 54b3d1c and fb3a199.

Files selected for processing (2)
  • src/main/java/org/joda/time/tz/ZoneInfoCompiler.java (2 hunks)
  • src/test/java/org/joda/time/format/TestDateTimeFormatterBuilder.java (2 hunks)
Additional comments not posted (4)
src/test/java/org/joda/time/format/TestDateTimeFormatterBuilder.java (2)

550-557: LGTM!

The test has been correctly updated to use the "CET" time zone instead of "MET". The changes align with the PR objective.


560-567: Looks good!

The test has been appropriately updated to use the "CET" time zone instead of "MET", including the function name and the expected output. The changes are consistent with the PR objective.

src/main/java/org/joda/time/tz/ZoneInfoCompiler.java (2)

639-645: Refines the handling of time zone aliases. Looks good!

The changes to the conditions for adding aliases to iGoodLinks and iBackLinks appear to be a deliberate refinement to improve the accuracy of the maintained links.

Explicitly checking for the "WET", "CET", and "EET" aliases and adding them to iGoodLinks while mapping the "MET" alias to "CET" in iBackLinks seems to be a targeted approach to handle specific cases, likely based on historical data or observed inconsistencies.

The removal of the broader conditions that accounted for backward compatibility and certain aliases simplifies the logic and focuses on the key aliases that require special handling.


971-973: Improves logging efficiency by making the debug message conditional. Looks good!

Wrapping the output of the debug message regarding fixed negative save values within a conditional check for verbosity is a good practice.

This change enhances the control over logging output and makes it more efficient by avoiding unnecessary console output during normal operations when verbose logging is not enabled.

It allows the debugging information to be easily turned on when needed for troubleshooting or analysis, while keeping the console clean during regular execution.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    -- I pushed a fix in commit <commit_id>, please review it.
    -- Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    -- @coderabbitai generate unit testing code for this file.
    -- @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    -- @coderabbitai generate interesting stats about this repository and render them as a table.
    -- @coderabbitai read src/utils.ts and generate unit testing code.
    -- @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    -- @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@jodastephen

This comment was marked as outdated.

This comment was marked as outdated.

@jodastephen jodastephen merged commit f38a08e into main Sep 15, 2024
6 checks passed
@jodastephen jodastephen deleted the tzdb-adapt branch September 15, 2024 22:11
github-merge-queue bot referenced this pull request in camunda/camunda Sep 16, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [joda-time:joda-time](https://www.joda.org/joda-time/)
([source](https://redirect.github.com/JodaOrg/joda-time)) | `2.12.7` ->
`2.13.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/joda-time:joda-time/2.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/joda-time:joda-time/2.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/joda-time:joda-time/2.12.7/2.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/joda-time:joda-time/2.12.7/2.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>JodaOrg/joda-time (joda-time:joda-time)</summary>

###
[`v2.13.0`](https://redirect.github.com/JodaOrg/joda-time/releases/tag/v2.13.0)

[Compare
Source](https://redirect.github.com/JodaOrg/joda-time/compare/v2.12.7...v2.13.0)

See the [change
notes](https://www.joda.org/joda-time/changes-report.html#a2.13.0) for
more information.

#### What's Changed

- Make `ConverterManager.getInstance()` init thread-safe. by
[@&#8203;cpovirk](https://redirect.github.com/cpovirk) in
[https://github.com/JodaOrg/joda-time/pull/776](https://redirect.github.com/JodaOrg/joda-time/pull/776)
- Add website page about secutity/CVEs by
[@&#8203;jodastephen](https://redirect.github.com/jodastephen) in
[https://github.com/JodaOrg/joda-time/pull/781](https://redirect.github.com/JodaOrg/joda-time/pull/781)
- fix: include native-image files correctly by
[@&#8203;klopfdreh](https://redirect.github.com/klopfdreh) in
[https://github.com/JodaOrg/joda-time/pull/784](https://redirect.github.com/JodaOrg/joda-time/pull/784)
- Enhance TZDB compiler to better match spec by
[@&#8203;jodastephen](https://redirect.github.com/jodastephen) in
[https://github.com/JodaOrg/joda-time/pull/786](https://redirect.github.com/JodaOrg/joda-time/pull/786)
- Update GitHub actions to latest versions by
[@&#8203;jodastephen](https://redirect.github.com/jodastephen) in
[https://github.com/JodaOrg/joda-time/pull/788](https://redirect.github.com/JodaOrg/joda-time/pull/788)
- Fix TZDB compiler %z parsing by
[@&#8203;jodastephen](https://redirect.github.com/jodastephen) in
[https://github.com/JodaOrg/joda-time/pull/787](https://redirect.github.com/JodaOrg/joda-time/pull/787)
- Update tzdb handling by
[@&#8203;jodastephen](https://redirect.github.com/jodastephen) in
[https://github.com/JodaOrg/joda-time/pull/789](https://redirect.github.com/JodaOrg/joda-time/pull/789)
- Update time zone data to 2024bgtz by
[@&#8203;github-actions](https://redirect.github.com/github-actions) in
[https://github.com/JodaOrg/joda-time/pull/790](https://redirect.github.com/JodaOrg/joda-time/pull/790)

#### New Contributors

- [@&#8203;cpovirk](https://redirect.github.com/cpovirk) made their
first contribution in
[https://github.com/JodaOrg/joda-time/pull/776](https://redirect.github.com/JodaOrg/joda-time/pull/776)
- [@&#8203;klopfdreh](https://redirect.github.com/klopfdreh) made their
first contribution in
[https://github.com/JodaOrg/joda-time/pull/784](https://redirect.github.com/JodaOrg/joda-time/pull/784)

**Full Changelog**:
JodaOrg/joda-time@v2.12.7...v2.13.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/camunda/camunda).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC43NC4xIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiYXV0b21lcmdlIl19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant