RE: [PHP] Weird mktime problem
| From: | Ford, Mike [LSS] | Date: | Thu, 26 Jun 2003 10:56:13 +0000 |
| Subject: | RE: [PHP] Weird mktime problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-152949@lists.php.net to get a copy of this message | ||
Ooops! Make that:
<?php
$timestamp = 1056405600;
echo "GMT = ", gmdate("Y-m-d H:i:s", $timestamp), "<br />\n";
echo "local = ", date("Y-m-d H:i:s", $timestamp), "<br />\n";
?>
> -----Original Message-----
> From: Ford, Mike [LSS]
> Sent: 26 June 2003 10:53
>
> UNIX timestamps are *always* GMT -- it's the routines that
> process them that do timezone (and DST) conversion. To prove
> this, run the following on your server:
>
> <?php
> $timestamp = 1056405600;
> echo "GMT = ", gmdate("Y-m-d H:i:s"), "<br />\n";
> echo "local = ", date("Y-m-d H:i:s"), "<br />\n";
> ?>
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211