Package com.adobe.xmp.core
Class XMPDateTimeUtils
- java.lang.Object
-
- com.adobe.xmp.core.XMPDateTimeUtils
-
public final class XMPDateTimeUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description XMPDateTimeUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static XMPDateTime
convertToLocalTimeZone(XMPDateTime dateTime, boolean adjustTime)
Set to the local time zone (local timezone is provided by the OS).static XMPDateTime
convertToUTCTime(XMPDateTime dateTime)
Make sure a time is UTC.static XMPDateTime
getCurrentDateTime()
Obtain the current date and time.
-
-
-
Method Detail
-
getCurrentDateTime
public static XMPDateTime getCurrentDateTime()
Obtain the current date and time.- Returns:
- Returns The returned time is UTC, properly adjusted for the local time zone. The resolution of the time is not guaranteed to be finer than seconds.
-
convertToLocalTimeZone
public static XMPDateTime convertToLocalTimeZone(XMPDateTime dateTime, boolean adjustTime)
Set to the local time zone (local timezone is provided by the OS). if adjustTime is false no other existing time zone value is replaced, the other date/time fields are not adjusted in any way. If adjustTime is true, the time is adjusted based on the local time zone.- Parameters:
dateTime
- theXMPDateTime
variable containing the value to be modified.adjustTime
- flag if the time should be adjusted based on the time- Returns:
- Returns an updated
XMPDateTime
-object.
-
convertToUTCTime
public static XMPDateTime convertToUTCTime(XMPDateTime dateTime)
Make sure a time is UTC. If the time zone is not UTC, the time is adjusted and the time zone set to be UTC.- Parameters:
dateTime
- theXMPDateTime
variable containing the time to be modified.- Returns:
- Returns an updated
XMPDateTime
-object.
-
-