News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Derick Rethans' Blog:
PHP lags 23 seconds
January 11, 2006 @ 06:41:13

In this new post on his blog today, Derick Rethans points out something that might confuse some when it comes to date/time handling - a few seconds of "lag".

Bug report #35958 must have the most obscure one ever:

"strftime usually returns a string from the number of seconds since 1 jan 1970. Now, it lags and returns a string representing 23 seconds too late."

If you know what's going on though, it isn't really that weird.

He talks about the leap seconds that have been added to keep things straight, and how that's affecting PHP's built-in date/time functionality. He also shows an example of how you can get the "more correct" time versus the normal output...

0 comments voice your opinion now!
lag time date 23 seconds leap second lag time date 23 seconds leap second


blog comments powered by Disqus

Similar Posts

Derick Rethans' Blog: Leap Seconds and What To Do With Them

Builder.com.au: Get the correct time by converting between time zones with PHP and PEAR

Leonid Mamchenkov' Blog: PHP date() and 53 weeks

Ryan Grove's Blog: Minify combines, minifies &caches JavaScript & CSS files to speed up page loads

Michael Caplan's Blog: Don't Forget to Flush


Community Events

Don't see your event here?
Let us know!


opinion unittest laravel release symfony community introduction podcast version threedevsandamaybe series voicesoftheelephpant api security interview framework language laravel5 extension library

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework