note 18946 modified in function.date by alindeman
| From: | alindeman@php.net | Date: | Tue, 12 Feb 2002 00:30:52 +0000 |
| Subject: | note 18946 modified in function.date by alindeman | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-26492@lists.php.net to get a copy of this message | ||
because it isn't made explicitly clear yet, and something I just learned after several years of
PHP and database work, and having just moved to a server out of Eastern Standard Time:
the date() function calls the date relative to the time of the server, NOT that of your browser.
Even "local" time is confusing, as it is not your local time, but that of the server your
silly site is hosted on.
This is a very big deal on things that utilise date and time such as message boards, private
web-based instant messaging, web-based chat, whatever the dilly.
To correct this, you will need help from your usership, which is something you should not depend on.
You will probably need them to personally specify their time difference, unless you combine
javascript or some other things to calculate everything.
redspider hints at it, good job soldier. go to his site, hosted in pittsburgh, for the melbdate
function.
--was--
[Editor's Note: PHP is a server side language, therefore it will obviously get the date from
the server --alindeman@php.net]
because it isn't made explicitly clear yet, and something I just learned after several years of
PHP and database work, and having just moved to a server out of Eastern Standard Time:
the date() function calls the date relative to the time of the server, NOT that of your browser.
Even "local" time is confusing, as it is not your local time, but that of the server your
silly site is hosted on.
This is a very big deal on things that utilise date and time such as message boards, private
web-based instant messaging, web-based chat, whatever the dilly.
To correct this, you will need help from your usership, which is something you should not depend on.
You will probably need them to personally specify their time difference, unless you combine
javascript or some other things to calculate everything.
redspider hints at it, good job soldier. go to his site, hosted in pittsburgh, for the melbdate
function.
http://www.php.net/manual/en/function.date.php