Complete Joda-Time to java.time migration#3039
Open
CydeWeys wants to merge 1 commit intogoogle:masterfrom
Open
Complete Joda-Time to java.time migration#3039CydeWeys wants to merge 1 commit intogoogle:masterfrom
CydeWeys wants to merge 1 commit intogoogle:masterfrom
Conversation
This completes the exhaustive refactoring of foundational temporal types from Joda-Time to the native java.time API across the entire codebase. - Replaced org.joda.time.DateTime, Instant, LocalDate, and Duration with java.time equivalents. - Audited and updated Clock implementations (FakeClock, SystemClock). Added nowMillis() and todayUtc() to eliminate repetitive conversions throughout the codebase. - Completely removed all transitional bridge methods from DateTimeUtils and deleted obsolete converters (e.g., DateTimeConverter). - Updated testing infrastructure, Apache Beam pipelines, custom JCommander parameters, and networking modules to solely rely on java.time primitives. - Retained the lone necessary org.joda.time.Instant usage in SafeBrowsingTransforms required by the Apache Beam API. - Cleared Gradle lockfiles and removed the joda-time dependency entirely from the build configuration.
| public DateTime getMtime() { | ||
| return new DateTime(Long.parseLong(extractField(136, 12).trim(), 8) * MILLIS_PER_SECOND, UTC); | ||
| public Instant getMtime() { | ||
| return Instant.ofEpochMilli(Long.parseLong(extractField(136, 12).trim(), 8) * 1000L); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This completes the exhaustive refactoring of foundational temporal types from Joda-Time to the native java.time API across the entire codebase.
This change is