Package tigase.util.datetime
Class TimestampHelper
java.lang.Object
tigase.util.datetime.TimestampHelper
- Author:
- andrzej
-
Constructor Summary
ConstructorsConstructorDescriptionCreates helper configured to produce timestamps in UTC timezone.TimestampHelper(boolean useUTC) Creates helper configured to produce timestamps in UTC timezone or local timezone. -
Method Summary
Modifier and TypeMethodDescriptionformatWithMs(Date ts) booleanisUseUTC()parseTimestamp(String tmp) voidsetUseUTC(boolean useUTC) Iffalsethen generated timestamps will be in local timezone.
-
Constructor Details
-
TimestampHelper
public TimestampHelper()Creates helper configured to produce timestamps in UTC timezone.- See Also:
-
TimestampHelper
public TimestampHelper(boolean useUTC) Creates helper configured to produce timestamps in UTC timezone or local timezone.- Parameters:
useUTC-trueto use UTC timezone,falseto use local timezone.- See Also:
-
-
Method Details
-
format
-
formatInLegacyDelayedDelivery
-
formatWithMs
-
isUseUTC
public boolean isUseUTC() -
setUseUTC
public void setUseUTC(boolean useUTC) Iffalsethen generated timestamps will be in local timezone. In other case UTC will be used.trueby default.- Parameters:
useUTC-trueto use UTC timezone,falseto use local timezone.
-
parseTimestamp
- Throws:
ParseException
-