1
0
mirror of https://github.com/google/nomulus synced 2026-05-21 23:31:51 +00:00

Migrate EPP Flows, TLD, and Domain Base models to java.time (#3025)

Migrates the massive DomainBase, DomainHistory, and Registrar models to use java.time.Instant natively, removing all deprecated DateTime accessors and fixing their associated JPA converters.
Migrates the Tld entity and its entire JSON/YAML testing ecosystem, including implementing an InstantKeySerializer to preserve millisecond precision in Jackson.
Migrates the entire Epp Flow ecosystem (Create, Update, Delete, Renew, Transfer for Domains/Hosts/Contacts) to use native Instant parameters and operations.
Migrates EppTestCase and EppLifecycleDomainTest to use Instant natively instead of constantly double-wrapping timestamps.
Rebases against upstream and standardizes all Duration and DateTimeUtils static imports across the test suites.
This commit is contained in:
Ben McIlwain
2026-04-29 20:05:55 -04:00
committed by GitHub
parent 859f356466
commit 6e77a6b0e7
108 changed files with 883 additions and 1036 deletions

View File

@@ -69,13 +69,18 @@ public abstract class DateTimeUtils {
* <p>Handles large/negative years by using a sign prefix if necessary, compatible with {@link
* Instant#parse}.
*/
public static final DateTimeFormatter ISO_8601_FORMATTER =
private static final DateTimeFormatter ISO_8601_FORMATTER =
new DateTimeFormatterBuilder()
.appendValue(ChronoField.YEAR, 4, 10, SignStyle.NORMAL)
.appendPattern("-MM-dd'T'HH:mm:ss.SSS'Z'")
.toFormatter()
.withZone(ZoneOffset.UTC);
/** Formats an {@link Instant} to an ISO-8601 string. */
public static String formatInstant(Instant instant) {
return ISO_8601_FORMATTER.format(instant);
}
/**
* Parses an ISO-8601 string to an {@link Instant}.
*