public class MicroTimestampLongConverter extends AbstractTimestampLongConverter
MicroTimestampLongConverter is an implementation of AbstractTimestampLongConverter
which handles conversions between long timestamps and date-time strings.
The precision of this converter is to the microsecond, extra precision is ignored.
This converter is singleton, the instance can be accessed using the public field INSTANCE.| Modifier and Type | Field and Description |
|---|---|
static MicroTimestampLongConverter |
INSTANCE
The singleton instance of this converter.
|
TIMESTAMP_LONG_CONVERTERS_ZONE_ID_SYSTEM_PROPERTY, UTC| Constructor and Description |
|---|
MicroTimestampLongConverter()
Constructs a new
MicroTimestampLongConverter with the default zone ID (fetched from the system property or UTC). |
MicroTimestampLongConverter(String zoneId)
Constructs a new
MicroTimestampLongConverter with the specified zone ID. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendFraction(DateTimeFormatterBuilder builder)
Append the fraction-of-second pattern to the formatter builder.
|
protected long |
parseFormattedDate(ZonedDateTime value)
Parses a formatted date into a long timestamp.
|
protected long |
parseTimestamp(long value,
CharSequence text)
Parses a long timestamp.
|
append, append, append, parseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddEncode, allSafeChars, asString, asText, asText, forSymbols, lengthCheck, lengthCheck, maxParseLength, maxParseLength, parsepublic static final MicroTimestampLongConverter INSTANCE
public MicroTimestampLongConverter()
MicroTimestampLongConverter with the default zone ID (fetched from the system property or UTC).
Supports the old system property for micro timestamps specifically.public MicroTimestampLongConverter(String zoneId)
MicroTimestampLongConverter with the specified zone ID.zoneId - The string representation of the ZoneId (e.g., "UTC", "Europe/London")
to be used for formatting date-time strings. This converter
handles timestamps with microsecond precision.protected void appendFraction(DateTimeFormatterBuilder builder)
AbstractTimestampLongConverterappendFraction in class AbstractTimestampLongConverterbuilder - The DateTimeFormatterBuilder after the basic date
and time pattern has been added.protected long parseFormattedDate(ZonedDateTime value)
parseFormattedDate in class AbstractTimestampLongConvertervalue - The parsed formatted date (in UTC zone)protected long parseTimestamp(long value,
CharSequence text)
parseTimestamp in class AbstractTimestampLongConvertervalue - The parsed timestamptext - The text version of the timestampCopyright © 2026 Chronicle Software Ltd. All rights reserved.