#20113 [NEW]: time() does not work correctly !!
| From: | corinl at gmx dot de | Date: | Sun, 27 Oct 2002 01:53:04 +0000 |
| Subject: | #20113 [NEW]: time() does not work correctly !! | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-23403@lists.php.net to get a copy of this message | ||
From: corinl@gmx.de
Operating system: linux
PHP version: 4.2.2
PHP Bug Type: Date/time related
Bug description: time() does not work correctly !!
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 !!
--
Edit bug report at http://bugs.php.net/?id=20113&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=20113&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=20113&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=20113&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=20113&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=20113&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=20113&r=support
Expected behavior: http://bugs.php.net/fix.php?id=20113&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=20113&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=20113&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=20113&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20113&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=20113&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=20113&r=isapi