public class UtcTime
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static long |
MAX_VALUE
Represents 9999-01-01 12AM GMT
|
static long |
MIN_VALUE
Represents 1601-01-01 12AM GMT
|
static UtcTime |
NULL_UTC_TIME |
Constructor and Description |
---|
UtcTime()
Creates a new UtcTime initialized to right now
|
UtcTime(long utcTime)
Creates a new UtcTime with the given time, which should be the number of 100 nanosecond
intervals since Jan 1, 1601
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
static UtcTime |
fromJavaTime(java.util.Date time)
Creates a new UtcTime from a java.util.Date instance
|
static UtcTime |
fromJavaTime(long time)
Creates a new UtcTime from a Java system timestamp (millis since 1970)
|
java.util.Date |
getJavaDate()
Returns this time as a java.util.Date instance
|
long |
getJavaTime()
Returns the time as milliseconds since the Java epoch (Jan 1, 1970)
|
long |
getUtcTime()
Returns the time as 100 nanosecond intervals since Jan 1, 1601
|
int |
hashCode() |
static void |
main(java.lang.String[] args) |
java.lang.String |
toString() |
public static UtcTime NULL_UTC_TIME
public static final long MAX_VALUE
public static final long MIN_VALUE
public UtcTime()
public UtcTime(long utcTime)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public static UtcTime fromJavaTime(long time)
public static UtcTime fromJavaTime(java.util.Date time)
public java.util.Date getJavaDate()
public long getUtcTime()
public long getJavaTime()
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)