Class TimestampUtils


  • public class TimestampUtils
    extends Object
    Slimmed down from org.postgresql.jdbc2.TimestampUtils
    • Field Detail

      • DATE_POSITIVE_INFINITY

        public static final long DATE_POSITIVE_INFINITY
        See Also:
        Constant Field Values
      • DATE_NEGATIVE_INFINITY

        public static final long DATE_NEGATIVE_INFINITY
        See Also:
        Constant Field Values
      • DATE_POSITIVE_SMALLER_INFINITY

        public static final long DATE_POSITIVE_SMALLER_INFINITY
        See Also:
        Constant Field Values
      • DATE_NEGATIVE_SMALLER_INFINITY

        public static final long DATE_NEGATIVE_SMALLER_INFINITY
        See Also:
        Constant Field Values
    • Constructor Detail

      • TimestampUtils

        public TimestampUtils()
    • Method Detail

      • toDate

        public static Date toDate​(TimeZone tz,
                                  int days)
        Returns the SQL Date object given the timezone and number of days
        Parameters:
        tz - The timezone used.
        Returns:
        The parsed date object.
      • toPgSecs

        public static long toPgSecs​(long secs)
        Converts the given java seconds to postgresql seconds. See toJavaSecs(long) for the reverse operation. The conversion is valid for any year 100 BC onwards.
        Parameters:
        secs - Postgresql seconds.
        Returns:
        Java seconds.