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

Method addSecond

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

Returns a timestamp relative to this one by the given number of seconds. This method always returns a Timestamp with SECOND precision. For example, adding one second to 2011T results in 2011-01-01T00:00:01-00:00. To receive a Timestamp that always maintains the same precision as

(int amount)

Source from the content-addressed store, hash-verified

2484 * @param amount a number of seconds.
2485 */
2486 public final Timestamp addSecond(int amount)
2487 {
2488 long delta = (long) amount * 1000;
2489 return addMillisForPrecision(delta, Precision.SECOND, false);
2490 }
2491
2492 /**
2493 * Returns a timestamp relative to this one by the given number of minutes.

Calls 1

addMillisForPrecisionMethod · 0.95