GlideDateTime - add(GlideTime time)

Adds a GlideTime object to the current GlideDateTime object.

Table 1. Parameters
Name Type Description
time GlideTime The time to add.
Table 2. Returns
Type Description
void

Scoped equivalent

To use the add() method in a scoped application, use the corresponding scoped method: Scoped GlideDateTime - add(GlideTime gd).

var gdt = new GlideDateTime("2011-08-31 08:00:00");
var gtime1 = new GlideTime();
gtime1.setValue("00:00:20");
gdt.add(gtime1);
gs.print(gdt.getTime());

Output: 1970-01-01 08:00:20