Print local time as an indexed and as an associative array:
The localtime() function returns the local time.
Parameter | Description |
---|---|
timestamp | Optional. Specifies a Unix timestamp that defaults to the current local time, time(), if no timestamp is specified |
is_assoc | Optional. Specifies whether to return an associative or indexed array. FALSE
= the array returned is an indexed array. TRUE = the
array returned is an associative array. FALSE is default.
The keys of the associative array are:
|
Return Value: | Returns an array that contains the components of a Unix timestamp |
---|---|
PHP Version: | 4+ |
Changelog: | PHP 5.1.0: Now issues E_STRICT and E_NOTICE time
zone errors |