Class DateUtils

    • Method Detail

      • getDate

        public static Date getDate​(String zuluTime)
        Converts a generalized time string to a Date object.
        Parameters:
        zuluTime - the generalized time string
        Returns:
        the converted data
      • getGeneralizedTime

        public static String getGeneralizedTime​(TimeProvider timeProvider)
        Gets the generalized time right now. GeneralizedTime
        Parameters:
        timeProvider - The Time provider to use to generate a time
        Returns:
        the generalizedTime right now
      • convertIntervalDate

        public static Date convertIntervalDate​(String intervalDate)
                                        throws ParseException
        Converts the 18-digit Active Directory timestamps, also named 'Windows NT time format' or 'Win32 FILETIME or SYSTEMTIME'. These are used in Microsoft Active Directory for pwdLastSet, accountExpires, LastLogon, LastLogonTimestamp and LastPwdSet. The timestamp is the number of 100-nanoseconds intervals (1 nanosecond = one billionth of a second) since Jan 1, 1601 UTC.

        Parameters:
        intervalDate - 18-digit number. Time in 100-nanoseconds intervals since 1.1.1601
        Returns:
        The converted date
        Throws:
        ParseException - If the given interval is not valid