Categories
Asides

Why MySQL timestamp is 24 seconds different from PHP

You may find that timestamp value returned by MySQL UNIX_TIMESTAMP() function is 24 seconds grater than those returned by PHP functions and classes like strtotime(), mktime(), DateTime::getTimestamp(), Zend_Date::getTimestamp().

via Why MySQL timestamp is 24 seconds different from PHP | Pumka.net Blog.

Turns out MySQL applies leap seconds, but PHP doesn’t.

4 replies on “Why MySQL timestamp is 24 seconds different from PHP”

Leave a Reply

Your email address will not be published. Required fields are marked *