Scoped GlideDateTime - subtract(GlideTime time)

Subtracts a specified amount of time from the current GlideDateTime object.

Table 1. Parameters
Name Type Description
time GlideTime The time value to subtract.
Table 2. Returns
Type Description
void
var gdt = new GlideDateTime("2011-08-31 08:00:00");
var gtime1 = new GlideTime();
gtime1.setValue("00:00:20");
gdt.subtract(gtime1);
var gtime2 = gdt.getTime();
gs.info(gtime2.getByFormat('hh:mm:ss'));

Output: 07:59:40