| |
localtime
| Format:
localtime ( time ) |
Purpose:
This function corrects for the main time zone
and possible alternate (daylight savings) time zone for a time value.
The time parameter must be an integer and is normally
a value returned by caltime().
Return Values:
Returns an object containing the broken down time.
A broken down time object has the following fields:
| name | type | description | range |
| sec | integer | seconds after the minute | [0, 61] |
| min | integer | minutes after the hour | [0, 59] |
| hour | integer | hour since midnight | [0, 23] |
| mday | integer | day of the month | [1, 31] |
| mon | integer | months since January | [0, 11] |
| year | integer | year | |
| wday | integer | days since Sunday | [0, 6] |
| yday | integer | days since January 1 | [0, 365] |
| isdst | integer | flag for alternate daylight savings time | [0, 1, -1], 0=not in effect, 1=in effect, -1=information not available |
Example:
| input: | resulting output:
|
<? localtime(caltime())> | (sec=27, min=51, hour=1, mday=13, mon=1, year=2026, wday=5, yday=43, isdst=0) |
<? gmtime(caltime())> | (sec=27, min=51, hour=1, mday=13, mon=1, year=2026, wday=5, yday=43, isdst=0) |
See Also:
caltime(), difftime(), gmtime(), mktime(), strftime(), strptime().
This page was dynamically generated by the
web application development tool RADpage
of H.E.I.
Selected blog articles :
3D Objects on HTML pages,
CSS Transition Visibility, and
CSS Transition Display.
© 1996-2026 H.E.I. All Rights Reserved.
|