Name

gettimeofday

Synopsis

mixed gettimeofday([ bool return_float ])

Returns an associative array containing information about the current time, as obtained through gettimeofday(2). When return_float is set to true, a float is returned rather than an array.

The array contains the following keys and values:

sec

The current number of seconds since the Unix epoch.

usec

The current number of microseconds to add to the number of seconds.

minuteswest

The number of minutes west of Greenwich the current time zone is.

dsttime

The type of Daylight Savings Time correction to apply (during the appropriate time of year, a positive number if the time zone observes Daylight Savings Time).

Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.