Package com.adobe.xmp.core
Class XMPDateTimeUtils
java.lang.Object
com.adobe.xmp.core.XMPDateTimeUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic XMPDateTimeconvertToLocalTimeZone(XMPDateTime dateTime, boolean adjustTime) Set to the local time zone (local timezone is provided by the OS).static XMPDateTimeconvertToUTCTime(XMPDateTime dateTime) Make sure a time is UTC.static XMPDateTimeObtain the current date and time.
-
Constructor Details
-
XMPDateTimeUtils
public XMPDateTimeUtils()
-
-
Method Details
-
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
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- theXMPDateTimevariable 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
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- theXMPDateTimevariable containing the time to be modified.- Returns:
- Returns an updated
XMPDateTime-object.
-