04-02-2007, 12:30 AM
I had the following php code...
$posted = gmdate("jS F Y \a\\t g:ia");
But now, the clocks have been moved forward 1 hour, and it is displaying the time 1 hour behind?
How can i fix this to make it 1 hour ahed?
04-02-2007, 12:54 AM
Hmm gmdate is what it is... If you have the incorrect time for your timezone, then you need to change that and not the gmdate as it seems you would put this through a function to get a users timezone? Im just speculating...
04-02-2007, 12:59 AM
contrary to common belief, GMT does not move backwards and forwards. We are now in a different, 'made up' time zone called 'British Summer Time' (or GMT+1) If your server is on BST date() will give you the correct time.
04-02-2007, 01:48 AM
So how could i do that? I have seen the php date O and you can set it to be +0200 and that would mean 2 hours ahed of gmt, but i havent found any examples?
04-02-2007, 04:06 AM
mktime() (http://us.php.net/manual/en/function.mktime.php), strtotime() (http://us.php.net/manual/en/function.strtotime.php)
04-02-2007, 01:23 PM
Thanks for all your help!
Got it fixed now.