RE: [PHP] Problem with outputting date and time
| From: | Sandeep Hundal | Date: | Thu, 17 May 2001 11:16:50 +0000 |
| Subject: | RE: [PHP] Problem with outputting date and time | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-53216@lists.php.net to get a copy of this message | ||
what you could do is something like get the unix time, and add an hour to
that, and then use the date function to output the date.
$today = (time() + 3600);
$output = date("F jS Y, h:ia", $today);
hope that helps!
/sunny
-----Original Message-----
From: Good Fella [mailto:goodfella_gf@hotmail.com]
Sent: 17 May 2001 12:18
To: php-general@lists.php.net
Subject: [PHP] Problem with outputting date and time
Hi All,
I need help with a small problem. My website has many users from around the
world, and they need to submit a form at a certain time (UK Time).
Because of this, I need to display the UK Time on my website.
I do this by putting this code:
<?php echo gmdate("F jS Y, h:ia"); ?>
There is nothing wrong with this code, except for when the clock changes
(goes back/forward an hour).
This means that this code is 1 hour behind the real UK Time at the moment.
Is there any simple way of adding 1 hour onto this?
It's extremely confusing as it's making users from around the globe late
with their submissions.
Thanks for your help and time
SK
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net