public class TMTDateTimeFormatter
extends java.lang.Object
Constructor and Description |
---|
TMTDateTimeFormatter() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
format(long time)
Use
DateTimeFormatter.ISO_INSTANT.withZone(ZoneOffset.UTC) to format the provided time |
static java.time.ZonedDateTime |
parse(java.lang.String dateStr)
Use
DateTimeFormatter.ISO_INSTANT.withZone(ZoneOffset.UTC) to parse the provided time |
public static java.lang.String format(long time)
DateTimeFormatter.ISO_INSTANT.withZone(ZoneOffset.UTC)
to format the provided time
time
- the time needed to format and write in logspublic static java.time.ZonedDateTime parse(java.lang.String dateStr)
DateTimeFormatter.ISO_INSTANT.withZone(ZoneOffset.UTC)
to parse the provided time
dateStr
- the time in string format that need to parse