O'Reilly logo

Programming PHP, 3rd Edition by Peter MacIntyre, Kevin Tatroe, Rasmus Lerdorf

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

localtime

Synopsis

array localtime([int timestamp[, bool associative])

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:

tm_sec

Seconds

tm_min

Minutes

tm_hour

Hour

tm_mday

Day of the month

tm_mon

Month of the year

tm_year

Number of years since 1900

tm_wday

Day of the week

tm_yday

Day of the year

tm_isdst

1 if Daylight Savings Time was in effect at the date and time

If a numeric array is returned, the values are in the order given above.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required