adjustSecond (DateTime - Java)

Increments a date-time by the number of seconds you specify.

Defined in



public void adjustSecond(int n)
    throws NotesException
public void adjustSecond(int n, boolean preservelocaltime)
    throws NotesException


int n

The number of seconds by which to increment the date-time. Can be positive or negative.

boolean preservelocaltime

Affects adjustments that cross a daylight-saving time boundary. Specify true to increment or decrement the GMT time by one hour such that a 24-hour adjustment yields the same local time in the new day. If this parameter is false or omitted, GMT time remains as adjusted and local time gains or loses an hour.


If the DateTime object consists of only a date component, this method has no effect.