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

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).

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