Package sop.util
Class UTCUtil
- java.lang.Object
-
- sop.util.UTCUtil
-
-
Field Summary
Fields Modifier and Type Field Description static SimpleDateFormat
UTC_FORMATTER
static SimpleDateFormat[]
UTC_PARSERS
-
Constructor Summary
Constructors Constructor Description UTCUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
formatUTCDate(Date date)
Format a date as ISO-8601 UTC timestamp.static Date
parseUTCDate(String dateString)
Parse an ISO-8601 UTC timestamp from a string.
-
-
-
Field Detail
-
UTC_FORMATTER
public static final SimpleDateFormat UTC_FORMATTER
-
UTC_PARSERS
public static final SimpleDateFormat[] UTC_PARSERS
-
-
Constructor Detail
-
UTCUtil
public UTCUtil()
-
-
Method Detail
-
parseUTCDate
public static Date parseUTCDate(String dateString)
Parse an ISO-8601 UTC timestamp from a string.- Parameters:
dateString
- string- Returns:
- date
-
formatUTCDate
public static String formatUTCDate(Date date)
Format a date as ISO-8601 UTC timestamp.- Parameters:
date
- date- Returns:
- timestamp string
-
-