public class TimestampHelper extends Object
| Constructor and Description |
|---|
TimestampHelper()
Creates helper configured to produce timestamps in UTC timezone.
|
TimestampHelper(boolean useUTC)
Creates helper configured to produce timestamps in UTC timezone or local timezone.
|
| Modifier and Type | Method and Description |
|---|---|
String |
format(Date ts) |
String |
formatInLegacyDelayedDelivery(Date date) |
String |
formatWithMs(Date ts) |
boolean |
isUseUTC() |
Date |
parseTimestamp(String tmp) |
void |
setUseUTC(boolean useUTC)
If
false then generated timestamps will be in local timezone. |
public TimestampHelper()
setUseUTC(boolean)public TimestampHelper(boolean useUTC)
useUTC - true to use UTC timezone, false to use local timezone.setUseUTC(boolean)public boolean isUseUTC()
public void setUseUTC(boolean useUTC)
false then generated timestamps will be in local timezone. In other case UTC will be used.
true by default.useUTC - true to use UTC timezone, false to use local timezone.public Date parseTimestamp(String tmp) throws ParseException
ParseExceptionCopyright © 2004–2021 "Tigase, Inc.". All rights reserved.