public final class DateUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Date |
convertIntervalDate(String intervalDate)
Converts the 18-digit Active Directory timestamps, also named 'Windows NT time format' or 'Win32 FILETIME or SYSTEMTIME'.
|
static Date |
getDate(String zuluTime)
Converts a generalized time string to a
Date object. |
static String |
getGeneralizedTime(Date date) |
static String |
getGeneralizedTime(long time) |
static String |
getGeneralizedTime(TimeProvider timeProvider)
Gets the generalized time right now.
|
public static Date getDate(String zuluTime)
Date
object.zuluTime
- the generalized time stringpublic static String getGeneralizedTime(TimeProvider timeProvider)
GeneralizedTime
timeProvider
- The Time provider to use to generate a timepublic static String getGeneralizedTime(Date date)
date
- the date to be converted to generalized time stringgetGeneralizedTime(TimeProvider)
public static String getGeneralizedTime(long time)
time
- the time value to be converted to generalized time stringgetGeneralizedTime(TimeProvider)
public static Date convertIntervalDate(String intervalDate) throws ParseException
intervalDate
- 18-digit number. Time in 100-nanoseconds intervals since 1.1.1601ParseException
- If the given interval is not validCopyright © 2003–2020 The Apache Software Foundation. All rights reserved.