GlideSystem - now()

Returns the current date in UTC.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
String The current date in the user-defined format, in UTC.

// When the user password changes then set the u_password_last_reset field
// to now so we know when to force another update
 
var gr = new GlideRecord("sys_user");
if (gr.get(event.parm1.toString())) {
    // Do something based on the Password Changing
    gs.log("The user password changed so do something else...");
    gr.u_password_last_reset = gs.now();
    gr.update();
}