Skip to content

Time optimization and modernization#351

Merged
ChrisJohnNOAA merged 3 commits intoERDDAP:mainfrom
ChrisJohnNOAA:time-optimization
Sep 9, 2025
Merged

Time optimization and modernization#351
ChrisJohnNOAA merged 3 commits intoERDDAP:mainfrom
ChrisJohnNOAA:time-optimization

Conversation

@ChrisJohnNOAA
Copy link
Contributor

Description

GregorianCalendar->java.time (mostly ZonedDateTime). This is an improvement in performance and memory usage along with simplifying our code (there's more to be done, I was trying to keep the impact outside of Calendar2 to a minimum in this pull) and moving to a modern standard.

One important thing to note, there are 2 test datasets that were impacted by this change. I don't know how common their configuration is for real datasets, but if you are using days (or smaller) since 1592 (or any earlier time like the year 0000) for a time column, you will likely want to add the attribute:
<att name="legacy_time_adjust">true</att>
to that variable.

This should keep the variable consistent with the old way of handling datetime.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • This change requires a documentation update

Checklist before requesting a review

  • I have performed a self-review of my code
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (documentation changes to be written later, though the pull description covers most of it)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@ChrisJohnNOAA ChrisJohnNOAA merged commit 141f772 into ERDDAP:main Sep 9, 2025
1 check passed
@ChrisJohnNOAA ChrisJohnNOAA deleted the time-optimization branch September 9, 2025 19:52
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.

1 participant