Package csw.logging.client.commons
Class TMTDateTimeFormatter
- java.lang.Object
- 
- csw.logging.client.commons.TMTDateTimeFormatter
 
- 
 public class TMTDateTimeFormatter extends java.lang.ObjectTMTDateTimeFormatter has a DateTimeFormatter of UTC timezone. It uses this DateTimeFormatter to format the time and parse the string presenting a time.
- 
- 
Constructor SummaryConstructors Constructor Description TMTDateTimeFormatter()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Stringformat(long time)UseDateTimeFormatter.ISO_INSTANT.withZone(ZoneOffset.UTC)to format the provided timestatic java.time.ZonedDateTimeparse(java.lang.String dateStr)UseDateTimeFormatter.ISO_INSTANT.withZone(ZoneOffset.UTC)to parse the provided time
 
- 
- 
- 
Method Detail- 
formatpublic static java.lang.String format(long time) UseDateTimeFormatter.ISO_INSTANT.withZone(ZoneOffset.UTC)to format the provided time- Parameters:
- time- the time needed to format and write in logs
- Returns:
- a string representation of time provided in long
 
 - 
parsepublic static java.time.ZonedDateTime parse(java.lang.String dateStr) UseDateTimeFormatter.ISO_INSTANT.withZone(ZoneOffset.UTC)to parse the provided time- Parameters:
- dateStr- the time in string format that need to parse
- Returns:
- a ZonedDateTime created out of provided time
 
 
- 
 
-