Class DateTimeUtils


  • public final class DateTimeUtils
    extends Object
    Utilities for dealing with date/times
    • Field Detail

      • FORMAT_STRING_TIMESTAMP_WITH_MILLIS_AND_OFFSET

        public static final String FORMAT_STRING_TIMESTAMP_WITH_MILLIS_AND_OFFSET
        See Also:
        Constant Field Values
      • FORMAT_STRING_TIMESTAMP_WITH_MICROS_AND_OFFSET

        public static final String FORMAT_STRING_TIMESTAMP_WITH_MICROS_AND_OFFSET
        See Also:
        Constant Field Values
      • DATE_TIME_FORMATTER_DATE

        public static final DateTimeFormatter DATE_TIME_FORMATTER_DATE
      • DATE_TIME_FORMATTER_TIME_WITH_OFFSET

        public static final DateTimeFormatter DATE_TIME_FORMATTER_TIME_WITH_OFFSET
      • DATE_TIME_FORMATTER_TIME

        public static final DateTimeFormatter DATE_TIME_FORMATTER_TIME
      • DATE_TIME_FORMATTER_TIMESTAMP_WITH_MILLIS

        public static final DateTimeFormatter DATE_TIME_FORMATTER_TIMESTAMP_WITH_MILLIS
      • DATE_TIME_FORMATTER_TIMESTAMP_WITH_MICROS

        public static final DateTimeFormatter DATE_TIME_FORMATTER_TIMESTAMP_WITH_MICROS
      • DATE_TIME_FORMATTER_TIMESTAMP_WITH_MILLIS_AND_OFFSET

        public static final DateTimeFormatter DATE_TIME_FORMATTER_TIMESTAMP_WITH_MILLIS_AND_OFFSET
      • DATE_TIME_FORMATTER_TIMESTAMP_WITH_MICROS_AND_OFFSET

        public static final DateTimeFormatter DATE_TIME_FORMATTER_TIMESTAMP_WITH_MICROS_AND_OFFSET
      • DATE_TIME

        public static final DateTimeFormatter DATE_TIME
        Pattern used for parsing literal datetimes in HQL. Recognizes timestamps consisting of a date and time separated by either T or a space, and with an optional offset or time zone ID. Ideally we should accept both ISO and SQL standard zoned timestamp formats here.
      • OFFSET_DATE_TIME

        public static final DateTimeFormatter OFFSET_DATE_TIME
        Pattern used for parsing literal offset datetimes in HQL. Recognizes timestamps consisting of a date and time separated by either T or a space, and with a required offset. Ideally we should accept both ISO and SQL standard timestamp formats here.
    • Method Detail

      • appendAsTimestampWithMicros

        public static void appendAsTimestampWithMicros​(SqlAppender appender,
                                                       TemporalAccessor temporalAccessor,
                                                       boolean supportsOffset,
                                                       TimeZone jdbcTimeZone)
      • appendAsTimestampWithMillis

        public static void appendAsTimestampWithMillis​(SqlAppender appender,
                                                       TemporalAccessor temporalAccessor,
                                                       boolean supportsOffset,
                                                       TimeZone jdbcTimeZone)
      • appendAsTimestampWithMillis

        public static void appendAsTimestampWithMillis​(SqlAppender appender,
                                                       Date date,
                                                       TimeZone jdbcTimeZone)
      • appendAsTimestampWithMicros

        public static void appendAsTimestampWithMicros​(SqlAppender appender,
                                                       Date date,
                                                       TimeZone jdbcTimeZone)
      • appendAsDate

        public static void appendAsDate​(SqlAppender appender,
                                        Date date)
      • appendAsTime

        public static void appendAsTime​(SqlAppender appender,
                                        Date date)
      • appendAsTimestampWithMillis

        public static void appendAsTimestampWithMillis​(SqlAppender appender,
                                                       Calendar calendar,
                                                       TimeZone jdbcTimeZone)
      • appendAsTimestampWithMicros

        public static void appendAsTimestampWithMicros​(SqlAppender appender,
                                                       Calendar calendar,
                                                       TimeZone jdbcTimeZone)