public class HighPrecisionDateTimeFormatters extends Object
Constructor and Description |
---|
HighPrecisionDateTimeFormatters() |
Modifier and Type | Method and Description |
---|---|
static void |
formatStorageTimestamp(byte[] buffer,
int offset,
OffsetDateTime dateTime,
TimestampPrecision precision)
Formats the value of
dateTime to Storage Timestamp format. |
static void |
formatTimeOnly(byte[] buffer,
LocalTime time,
TimestampPrecision precision)
Formats the value of
local time to the UTCTimeOnly format. |
static void |
formatTimeOnly(byte[] buffer,
LocalTime time,
TimestampPrecision precision,
int offset)
Formats the value of
local time to the UTCTimeOnly format. |
static void |
formatTimestamp(byte[] buffer,
LocalDateTime dateTime,
TimestampPrecision precision)
Formats the value of
dateTime to Timestamp format. |
static void |
formatTimestamp(byte[] buffer,
LocalDateTime dateTime,
TimestampPrecision precision,
int offset)
Formats the value of
dateTime to Timestamp format. |
static void |
formatTZTimeOnly(byte[] buffer,
OffsetTime time,
TimestampPrecision precision)
Formats the value of
offset time to the TZTimeOnly format. |
static void |
formatTZTimeOnly(byte[] buffer,
OffsetTime time,
TimestampPrecision precision,
int offset)
Formats the value of
offset time to the TZTimeOnly format. |
static void |
formatTZTimestamp(byte[] buffer,
OffsetDateTime dateTime,
TimestampPrecision precision)
Formats the value of
offset date time to the TZTimestamp format. |
static void |
formatTZTimestamp(byte[] buffer,
OffsetDateTime dateTime,
TimestampPrecision precision,
int offset)
Formats the value of
offset date time to the TZTimestamp format. |
public static void formatTimeOnly(byte[] buffer, LocalTime time, TimestampPrecision precision)
local time
to the UTCTimeOnly
format.
The format for UTCTimeOnly
is HH:MM:SS[.sss][sss][sss].buffer
- the buffer of bytes to keep the UTCTimeOnly
formattime
- the given time valueprecision
- the desired time precisionIllegalArgumentException
public static void formatTimeOnly(byte[] buffer, LocalTime time, TimestampPrecision precision, int offset)
local time
to the UTCTimeOnly
format.
The format for UTCTimeOnly
is HH:MM:SS[.sss][sss][sss].buffer
- the buffer of bytes to keep the UTCTimeOnly
formattime
- the given time valueprecision
- the desired time precisionoffset
- the offsetIllegalArgumentException
public static void formatTZTimeOnly(byte[] buffer, OffsetTime time, TimestampPrecision precision)
offset time
to the TZTimeOnly
format.
The format for TZTimeOnly
is HH:MM[:SS][.sss][sss][sss][Z | [ + | - hh[:mm]]].buffer
- the buffer of bytes to keep the UTCTimeOnly
formattime
- the given time valueprecision
- the desired time precisionpublic static void formatTZTimeOnly(byte[] buffer, OffsetTime time, TimestampPrecision precision, int offset)
offset time
to the TZTimeOnly
format.
The format for TZTimeOnly
is HH:MM[:SS][.sss][sss][sss][Z | [ + | - hh[:mm]]].buffer
- the buffer of bytes to keep the UTCTimeOnly
formattime
- the given time valueprecision
- the desired time precisionoffset
- the offsetpublic static void formatTimestamp(byte[] buffer, LocalDateTime dateTime, TimestampPrecision precision)
dateTime
to Timestamp
format.
The format of Timestamp
is YYYYMMDD-HH:MM:SS[.sss][sss][sss].buffer
- the buffer of bytes to keep the Timestamp
formatdateTime
- the given date time valueprecision
- the desired timestamp precisionIllegalArgumentException
public static void formatTimestamp(byte[] buffer, LocalDateTime dateTime, TimestampPrecision precision, int offset)
dateTime
to Timestamp
format.
The format of Timestamp
is YYYYMMDD-HH:MM:SS[.sss][sss][sss].buffer
- the buffer of bytes to keep the Timestamp
formatdateTime
- the given date time valueprecision
- the desired timestamp precisionoffset
- the offsetIllegalArgumentException
public static void formatTZTimestamp(byte[] buffer, OffsetDateTime dateTime, TimestampPrecision precision)
offset date time
to the TZTimestamp
format.
The format for TZTimestamp
is YYYYMMDD-HH:MM[:SS][.sss][sss][sss][Z | [ + | - hh[:mm]]].buffer
- the buffer of bytes to keep the TZTimestamp
formatdateTime
- the given date time valueprecision
- the desired timestamp precisionpublic static void formatTZTimestamp(byte[] buffer, OffsetDateTime dateTime, TimestampPrecision precision, int offset)
offset date time
to the TZTimestamp
format.
The format for TZTimestamp
is YYYYMMDD-HH:MM[:SS][.sss][sss][sss][Z | [ + | - hh[:mm]]].buffer
- the buffer of bytes to keep the TZTimestamp
formatdateTime
- the given date time valueprecision
- the desired timestamp precisionoffset
- the offsetpublic static void formatStorageTimestamp(byte[] buffer, int offset, OffsetDateTime dateTime, TimestampPrecision precision)
dateTime
to Storage Timestamp format.
The format of Storage Timestamp is "YYYYMMDD HH:MM:SS.sss[sss][sss] - ".buffer
- the buffer of bytes to keep the Storage Timestamp formatoffset
- the offsetdateTime
- the given date time valueprecision
- the desired timestamp precisionIllegalArgumentException
Copyright © 2000–2022 EPAM Systems. All rights reserved.