Package org.xbill.DNS
Class FormattedTime
java.lang.Object
org.xbill.DNS.FormattedTime
Routines for converting time values to and from YYYYMMDDHHMMSS format.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
DEFAULT_FORMAT
-
-
Constructor Details
-
FormattedTime
private FormattedTime()
-
-
Method Details
-
format
Converts a Date into a formatted string.- Parameters:
date- The Instant to convert.- Returns:
- The formatted string.
-
parse
Parses a formatted time string into an Instant.- Parameters:
s- The string, in the form YYYYMMDDHHMMSS or seconds since epoch (1 January 1970 00:00:00 UTC).- Returns:
- The Instant object.
- Throws:
DateTimeParseException- The string was invalid.
-