note 41072 added to function.gmmktime

From: Date: Mon, 29 Mar 2004 14:35:17 +0000
Subject: note 41072 added to function.gmmktime
Groups: php.notes 
Request: Send a blank email to php-notes+get-67324@lists.php.net to get a copy of this message
There appears to be a discrepency between PHP and C timestamps. The C time() and gettimeofday() functions are documented to return based on UTC time, but the value obtained doesn't match the PHP gmmktime() function. Instead, it matches the PHP mktime() function, which is supposed to be local time. It seems that C always uses a UTC timestamp and adjusts to local time through different handling functions (gmtime() vs localtime()). PHP appears to use differing UTC/local timestamps, but single handling functions. The exception to this rule is the PHP time() function, which appears to behave in the same was as the C version. In short, if your PHP is working with timestamps created in C (or vice versa) make sure you are comparing apples to apples. ---- Manual Page -- http://www.php.net/manual/en/function.gmmktime.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41072 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41072&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41072&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#67324) next »