MCPcopy Create free account
hub / github.com/amazon-ion/ion-java / getMillis

Method getMillis

src/main/java/com/amazon/ion/Timestamp.java:1640–1652  ·  view source on GitHub ↗

Returns a number representing the Timestamp's point in time that is the number of milliseconds ( ignoring any fractional milliseconds) from the epoch. This method will return the same result for all Timestamps representing the same point in time, regardless of the local offset. @return

()

Source from the content-addressed store, hash-verified

1638 * milliseconds) from the epoch (1970-01-01T00:00:00.000Z)
1639 */
1640 @SuppressWarnings("deprecation")
1641 public long getMillis()
1642 {
1643 // month is 0 based for Date
1644 long millis = Date.UTC(this._year - 1900, this._month - 1, this._day, this._hour, this._minute, this._second);
1645 if (this._fraction != null) {
1646 BigDecimal fracAsDecimal = this._fraction.movePointRight(3);
1647 int frac = isIntegralZero(fracAsDecimal) ? 0 : fracAsDecimal.intValue();
1648 millis += frac;
1649 }
1650 return millis;
1651
1652 }
1653
1654 /**
1655 * Returns a BigDecimal representing the Timestamp's point in time that is

Callers 9

testForDateZMethod · 0.95
testForSqlTimestampZMethod · 0.95
checkEquivalenceMethod · 0.95
dateValueMethod · 0.95
calendarValueMethod · 0.95
compareToMethod · 0.95

Calls 2

isIntegralZeroMethod · 0.95
intValueMethod · 0.65