Siebel eScript Language Reference > Siebel eScript Commands > The Clib Object >

Clib.gmtime() Method


This method converts an integer as returned by the Clib.time() function to a Time object representing the current date and time expressed as Greenwich Mean Time (GMT).

Syntax

Clib.gmtime(timeInt)

Parameter
Description
timeInt
A date-time value as returned by the Clib.time() function

Returns

A Time object representing the current date and time expressed as Greenwich Mean Time.

Usage

This method converts an integer as returned by the Clib.time() function to a Time object representing the current date and time expressed as Greenwich Mean Time (GMT). For details on the Time object, read The Time Object.

NOTE:  The line of code
      var now = Clib.asctime(Clib.gmtime(Clib.time())) + "GMT";
is exactly equivalent to the standard JavaScript construction
      var aDate = new Date;
      var now = aDate.toGMTString()
Wherever possible, the second form should be used.

Example

The following line of code returns the current GMT date and time as a string in the form Day Mon dd hh:mm:ss yyyy.

TheApplication().RaiseErrorText(Clib.asctime(Clib.gmtime(Clib.ti me())));

See Also

Clib.asctime() Method, Clib.ctime() Method, Clib.localtime() Method, Clib.mktime() Method, GetDate() Method, getTime() Method, getUTCDate() Method, and toGMTString() Method


 Siebel eScript Language Reference 
 Published: 18 April 2003