Package com.storedobject.core
Class JSON.DateTimeConverter
java.lang.Object
com.storedobject.core.JSON.DateTimeConverter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Date
Parses any RFC 3339 string (with any timezone) to java.sql.Date The date is converted to UTC for storagestatic String
Converts java.sql.Time (assumed UTC) to RFC 3339 UTC string Example: "1970-01-01T14:30:45Z"static String
Converts java.sql.Timestamp (assumed UTC) to RFC 3339 UTC string Example: "2023-10-27T14:30:45.123456789Z"static String
Converts java.sql.Date (assumed UTC) to RFC 3339 UTC string Example: "2023-10-27T00:00:00Z"static boolean
isValidRFC3339
(String input) Validates that a string is in RFC 3339 format (any timezone)static Time
Parses any RFC 3339 string (with any timezone) to java.sql.Time The time is converted to UTC for storagestatic Timestamp
Parses any RFC 3339 string (with any timezone) to java.sql.Timestamp The timestamp is converted to UTC for storage
-
Constructor Details
-
DateTimeConverter
public DateTimeConverter()
-
-
Method Details
-
date
-
time
-
timestamp
-
format
-
format
-
format
-
isValidRFC3339
Validates that a string is in RFC 3339 format (any timezone)
-