Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
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)
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 constructionvar aDate = new Date;
Wherever possible, the second form should be used.
var now = aDate.toGMTString()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
Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel eScript Language Reference Published: 18 April 2003 |