Package com.azure.android.core.util
Class UnixTime
- java.lang.Object
-
- com.azure.android.core.util.UnixTime
-
public final class UnixTime extends java.lang.Object
A wrapper over org.threeten.bp.OffsetDateTime used for specifying unix seconds format during serialization and deserialization.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
org.threeten.bp.OffsetDateTime
getDateTime()
Get the underlying DateTime.int
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
UnixTime
public UnixTime(org.threeten.bp.OffsetDateTime dateTime)
Creates aUnixTime object with the specified DateTime.- Parameters:
dateTime
- The DateTime object to wrap
-
UnixTime
public UnixTime(long unixSeconds)
Creates a UnixTime object with the specified DateTime.- Parameters:
unixSeconds
- The Unix seconds value
-
-
Method Detail
-
getDateTime
public org.threeten.bp.OffsetDateTime getDateTime()
Get the underlying DateTime.- Returns:
- The underlying DateTime
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-