Class TimestampHelper


  • public class TimestampHelper
    extends Object
    Author:
    andrzej
    • Constructor Detail

      • TimestampHelper

        public TimestampHelper()
        Creates helper configured to produce timestamps in UTC timezone.
        See Also:
        setUseUTC(boolean)
      • TimestampHelper

        public TimestampHelper​(boolean useUTC)
        Creates helper configured to produce timestamps in UTC timezone or local timezone.
        Parameters:
        useUTC - true to use UTC timezone, false to use local timezone.
        See Also:
        setUseUTC(boolean)
    • Method Detail

      • formatInLegacyDelayedDelivery

        public String formatInLegacyDelayedDelivery​(Date date)
      • formatWithMs

        public String formatWithMs​(Date ts)
      • isUseUTC

        public boolean isUseUTC()
      • setUseUTC

        public void setUseUTC​(boolean useUTC)
        If false then generated timestamps will be in local timezone. In other case UTC will be used. true by default.
        Parameters:
        useUTC - true to use UTC timezone, false to use local timezone.