public class TimestampWithTimeZone
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
| Constructor and Description |
|---|
TimestampWithTimeZone(long dateValue,
long timeNanos,
short timeZoneOffsetMins) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
int |
getDay()
Gets the day of month 1-based.
|
int |
getMonth()
Gets the month 1-based.
|
long |
getNanosSinceMidnight()
Gets the nanoseconds since midnight.
|
short |
getTimeZoneOffsetMins()
The time zone offset in minutes.
|
int |
getYear()
Gets the year.
|
long |
getYMD() |
int |
hashCode() |
java.lang.String |
toString() |
public TimestampWithTimeZone(long dateValue,
long timeNanos,
short timeZoneOffsetMins)
public long getYMD()
public int getYear()
The year is in the specified time zone and not UTC. So for
2015-12-31 19:00:00.00-10:00 the value returned
will be 2015 even though in UTC the year is 2016.
public int getMonth()
The month is in the specified time zone and not UTC. So for
2015-12-31 19:00:00.00-10:00 the value returned
is 12 even though in UTC the month is 1.
public int getDay()
The day of month is in the specified time zone and not UTC. So for
2015-12-31 19:00:00.00-10:00 the value returned
is 31 even though in UTC the day of month is 1.
public long getNanosSinceMidnight()
The nanoseconds are relative to midnight in the specified
time zone. So for 2016-09-24 00:00:00.000000001-00:01 the
value returned is 1 even though 60000000001
nanoseconds have passed since midnight in UTC.
public short getTimeZoneOffsetMins()
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object