public class TimestampWithTimeZone extends Object implements Serializable, Cloneable
Constructor and Description |
---|
TimestampWithTimeZone(long dateValue,
long timeNanos,
short timeZoneOffsetMins) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(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() |
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()
Copyright © 2020 JBoss by Red Hat. All rights reserved.