|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-10-26 22:20 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 06:00:01 2025 UTC |
hi, it seems that time() doens't work correctyl, either in mysql or php, but i thinks it's php. may be aynone can verify this ? test-code: // check timestamps... $t1 = time(); $sql = $theApp->sql->select_row("NOW() as t, UNIX_TIMESTAMP(NOW()) as s"); $t2 = $sql['s']; $sqlt = $sql['t']; error_log("php: $t1, mysql: $t2, dif: ".($t2-$t1).", php-time: ".date("H:i:s").", sql-time: ".$sqlt); outputs: php: 1035683199, mysql: 1035679599, dif: -3600, php-time: 02:46:39, sql-time: 2002-10-27 02:46:39 as you can see, the date reported is the same but the timestamp exactly differs one hour. i think this is because of summer/winter time, but im not sure. so either mysql or php returns wrong timestamp !!