Class TraceTime

java.lang.Object
io.jans.lock.trace.crypto.TraceTime

public final class TraceTime extends Object
Renders and parses the TRACE receipt timestamp (design ยง9): an RFC 3339 UTC string with exactly three fractional digits and a Z suffix, for example 2026-06-11T00:41:02.123Z. Instant.toString() is not used because it omits the fraction when the millisecond part is zero, which would change the receipt-hash input.
Author:
Yuriy Movchan
  • Method Details

    • formatMillis

      public static String formatMillis(long epochMs)
      Returns:
      epochMs as yyyy-MM-dd'T'HH:mm:ss.SSS'Z' in UTC
    • parseMillis

      public static long parseMillis(String text)
      Returns:
      epoch milliseconds for a value produced by formatMillis(long)
      Throws:
      IllegalArgumentException - if the text is not in the exact three-digit-fraction UTC form