GlideDateTime - addSeconds(Number seconds)

Adds a specified number of seconds to the GlideDateTime object.

Table 1. Parameters
Name Type Description
seconds Number The number of seconds to add
Table 2. Returns
Type Description
void

Scoped equivalent

To use the addSeconds() method in a scoped application, use the corresponding scoped method: Scoped GlideDateTime - addSeconds(Number seconds).

var gdt = new GlideDateTime("2011-12-07 08:00:00");
gdt.addSeconds(1000);
gs.print(gdt.getValue());

Output: 2011-12-07 08:16:40