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)
| 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. |