Class DateUtil

    • Method Detail

      • parseUTCDate

        public static Date parseUTCDate​(String dateString)
        Parse a UTC timestamp into a date.
        Parameters:
        dateString - timestamp
        Returns:
        date
      • formatUTCDate

        public static String formatUTCDate​(Date date)
        Format a date as UTC timestamp.
        Parameters:
        date - date
        Returns:
        timestamp
      • toSecondsPrecision

        public static Date toSecondsPrecision​(Date date)
        "Round" a date down to seconds precision.
        Parameters:
        date - date
        Returns:
        rounded date
      • now

        public static Date now()
        Return the current date "rounded" to UTC precision.
        Returns:
        now