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

Method adjustSecond

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

Returns a timestamp relative to this one by the given number of seconds. This method always returns a Timestamp with the same precision as the original. For example, adjusting 2012-04-01T00:00Z by one second results in 2012-04-01T00:00Z; adjusting 2012-04-01T00:00:00Z by

(int amount)

Source from the content-addressed store, hash-verified

2468 * @param amount a number of seconds.
2469 */
2470 public final Timestamp adjustSecond(int amount)
2471 {
2472 long delta = (long) amount * 1000;
2473 return adjustMillis(delta);
2474 }
2475
2476 /**
2477 * Returns a timestamp relative to this one by the given number of seconds.

Calls 1

adjustMillisMethod · 0.95