Class DateUtils


  • public final class DateUtils
    extends java.lang.Object
    • Field Detail

      • DATE_FORMAT_PATTERN

        public static final java.lang.String DATE_FORMAT_PATTERN
        See Also:
        Constant Field Values
      • TIMESTAMP_FORMAT_PATTERN

        public static final java.lang.String TIMESTAMP_FORMAT_PATTERN
        See Also:
        Constant Field Values
      • UTC_TIMEZONE

        public static final java.util.TimeZone UTC_TIMEZONE
      • LOCAL_TIMEZONE

        public static final java.util.TimeZone LOCAL_TIMEZONE
    • Method Detail

      • formatTimestamp

        public static java.lang.String formatTimestamp​(java.sql.Timestamp timestamp,
                                                       LoggingTimeZone timeZone)
      • formatAsLocalDate

        public static java.lang.String formatAsLocalDate​(java.util.Date date)
      • formatAsLocalTime

        public static java.lang.String formatAsLocalTime​(java.sql.Timestamp time)
      • formatAsUTCDate

        public static java.lang.String formatAsUTCDate​(java.util.Date date)
      • formatAsUTCTime

        public static java.lang.String formatAsUTCTime​(java.sql.Timestamp time)
      • formatForInstrumentation

        public static java.lang.String formatForInstrumentation​(java.sql.Timestamp time)
      • getDaylightSavingChanges

        public static java.util.List<java.util.Date> getDaylightSavingChanges​(java.util.Date start,
                                                                              java.util.Date end)
      • getFormattedStamp

        public static java.lang.String getFormattedStamp​(java.sql.Timestamp timestamp,
                                                         LoggingTimeZone timeZone)
        Returns a String formatted according to the given timestamp
        Parameters:
        timestamp -
        timeZone -
        Returns:
        A formatted string
      • newUTCCalendar

        public static java.util.Calendar newUTCCalendar()