Siebel eScript Language Reference > Siebel eScript Commands > Clib Object Time Methods >
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)
|
|
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, see Time Objects. 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.time())));
See Also
Clib.asctime() Method Clib.div() Method and Clib.ldiv() Method Clib.localtime() Method Clib.mktime() Method getDate() Method getTime() Method getUTCDate() Method toGMTString() Method
|