Returns a timestamp relative to this one by the given number of hours. This method always returns a Timestamp with the same precision as the original. For example, adjusting 2012-04-01T by one hour results in 2012-04-01T; adjusting 2012-04-01T00:00-00:00 by -1 hour result
(int amount)
| 2536 | * @param amount a number of hours. |
| 2537 | */ |
| 2538 | public final Timestamp adjustHour(int amount) |
| 2539 | { |
| 2540 | long delta = (long) amount * 60 * 60 * 1000; |
| 2541 | return adjustMillis(delta); |
| 2542 | } |
| 2543 | |
| 2544 | /** |
| 2545 | * Returns a timestamp relative to this one by the given number of hours. |