Difference between revisions of "NXSL:localtime"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
__NOTOC__ | |||
Converts time in UNIX format (number of seconds since epoch) to calendar date and time broken down into its components. Function uses either time given in time argument or current time if time is omitted. | |||
== Syntax == | |||
localtime(''time''); | |||
== Parameters == | |||
| | :{| | ||
|- | |- | ||
| | | ''time'' || Time as seconds since epoch (1 January 1970 00:00:00 UTC). If omitted, current time is used. | ||
|} | |} | ||
== Return Value == | |||
Object of class [[NXSL:TIME|TIME]]. | |||
== Examples == | |||
localtime(time())->year -> 2012 | |||
localtime()->year -> 2012 |
Revision as of 21:09, 21 April 2012
Converts time in UNIX format (number of seconds since epoch) to calendar date and time broken down into its components. Function uses either time given in time argument or current time if time is omitted.
Syntax
localtime(time);
Parameters
time Time as seconds since epoch (1 January 1970 00:00:00 UTC). If omitted, current time is used.
Return Value
Object of class TIME.
Examples
localtime(time())->year -> 2012 localtime()->year -> 2012