Re: Problem with outputting date and time
| From: | James Holloway | Date: | Thu, 17 May 2001 12:52:56 +0000 |
| Subject: | Re: Problem with outputting date and time | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-53231@lists.php.net to get a copy of this message | ||
Hi There,
I had a similar problem because of BST (British Sumer Time). Have a look on
Yahoo / Google etc for a site about Greenwich Mean Time, and find out the
dates that the schemes take effect - I think it is March 25th to beginning
or end of October. Then use a simple if statement.
<?
$hour = date("H");
if ((date("m") > 3) && (date("d") > 25) &&
(date("m") < 10) && (date("d") <
31)) {
$hour = $hour - 1;
}
?>
Hope that helps.
James.
""Good Fella"" <goodfella_gf@hotmail.com> wrote in message
news:F227N4MmXKCnzNwRC6H00003321@hotmail.com...
> 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
>