Name
localtime
Synopsis
array localtime([inttimestamp[, boolassociative])
Returns an array of values as given by the C function of the same
name. The first argument is the timestamp; if the second argument is
provided and is true, the values are returned as
an associative array. If the second argument is not provided or is
false, a numeric array is returned. The keys and
values returned are:
|
|
Seconds |
|
|
Minutes |
|
|
Hour |
|
|
Day of the month |
|
|
Month of the year |
|
|
Number of years since 1900 |
|
|
Day of the week |
|
|
Day of the year |
|
|
|
If a numeric array is returned, the values are in the order given above.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access