rollSecond()

Adds the specified (signed) amount to the Second field, without changing larger fields.

Syntax

Calendar rollSecond(Numeric amount)
  1. amount is the signed amount to add to the Second field.

Usage

For example, to roll the current time up by one second, you can achieve it by calling rollSecond(1).