Jump to content

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
https://forums.phpfreaks.com/topic/6115-british-summer-time/
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
https://forums.phpfreaks.com/topic/6115-british-summer-time/#findComment-22031
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
https://forums.phpfreaks.com/topic/6115-british-summer-time/#findComment-22034
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
https://forums.phpfreaks.com/topic/6115-british-summer-time/#findComment-22060
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
https://forums.phpfreaks.com/topic/6115-british-summer-time/#findComment-22074
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.