Jump to content

british summer time


j4ymf

Recommended Posts

hello i use this code

[b] [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]$now = date("G:i a");[!--colorc--][/span][!--/colorc--][/b]

but because the clocks have changed the time i am showing is an hour wrong any ideas?


can i do somthing like G+1


thanks jason
Link to comment
Share on other sites

You're going to have to use the mktime() function to add an hour. However, I suggest you figure out something in terms of server configuration otherwise you'll have problems when the time changes back.
Link to comment
Share on other sites

[!--quoteo(post=359742:date=Mar 29 2006, 05:53 PM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ Mar 29 2006, 05:53 PM) [snapback]359742[/snapback][/div][div class=\'quotemain\'][!--quotec--]
You're going to have to use the mktime() function to add an hour. However, I suggest you figure out something in terms of server configuration otherwise you'll have problems when the time changes back.
[/quote]

thankyou i will look into it
Link to comment
Share on other sites

PHP gets the time from the server itself. The servers clock should be configured to update automatically it should add an hour or take an hour away when the clocks go forward or back this process is automatic so you shouldn't have to worry about adding/removing hours from your times.

SO I would look into your how your server is configured. All PC/Laptops/Servers or what ever shoud do this. I think computers/servers will only do this if a setting called [b]Daylight saving changes[/b] is set.
Link to comment
Share on other sites

wildteen, I'm going to assume that "british summer time" is different from DST. The clocks don't change here for another week or so. This all may be dependent on where the server is physically located.
Link to comment
Share on other sites

hello ive got round it
[!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]echo date('G:i a', strtotime('+1 hour'));[!--colorc--][/span][!--/colorc--]

so do i need to ask my host where there server is based, if it is in the uk it should do its self am i right?





this is the reply i got from my server

Our servers, like practically all other internet servers, run on UTC/GMT. If you wish your site to display the time in British Summer Time, you will need to adjust your script.

so what does this mean??

Link to comment
Share on other sites

That means that you should either put something in your script to detect when it goes past date x and calculate the date accordingly. Either that or you'll have to update the script everytime the time shifts.

OR... you could take the date off of your site completely and let your users get the date and time from their own computers!

OR you could post the time and specify that it's based off of GMT.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.