Class TimestampWithTimezone


  • public class TimestampWithTimezone
    extends Object
    Utility methods for SQL Timestamps, Time, and Dates with time zones as UTC This is intended to take incoming Strings or Dates that have accurate Calendar fields and give the UTC time by interpretting those fields in the target time zone. Use of the Calendar object passed in will not be thread safe, but it will not alter the contents of the Calendar. Note that normalization occurs only for the transition from one type to another.
    • Field Detail

      • ISO8601_WEEK

        public static final boolean ISO8601_WEEK
    • Constructor Detail

      • TimestampWithTimezone

        public TimestampWithTimezone()
    • Method Detail

      • getCalendar

        public static Calendar getCalendar()
      • resetCalendar

        public static void resetCalendar​(TimeZone tz)
      • createTime

        public static Time createTime​(Date date)
        Creates normalized SQL Time Object
        Returns:
        Time
        Since:
        4.3
      • createDate

        public static Date createDate​(Date date)
        Creates normalized SQL Date Object
        Returns:
        Date
        Since:
        4.3
      • createTimestamp

        public static Timestamp createTimestamp​(Date date)