Forum Moderators: phranque

Message Too Old, No Replies

Server not adjusting for DST

         

asprinwizard

10:22 pm on Mar 19, 2008 (gmt 0)

10+ Year Member



Hi there,

I am having real problems with my web hosting company. They have recently upgraded the server to PHP 5.23 and since then it will not adjust to Daylight Savings Time or Britsih Summer time in teh UK.

I have a number of Rugby League fixtures on my site and many of the dates are during DST. However because the server will not adjust for DST the timestamps for the fixtures are 1 hour out, and so the timestamp is 23:00 the day before and the dates display the day before. I have checked using the following code:

echo date('P, I',$row_all_fixt['Date'])

Comparing this to my testing server I can see that the dates are not being adjusted after the clocks go forward for DST (or BST in the UK).

The hosting company are responsive but useless so before I move servers, can anyone tell me which setting (PHP or Apache) would need to be set to enable DST adjustment and bring my dates back into line. I have looked at phpinfo() but can't find a setting for this. The timezone on the server is set to UTC.

Any help greatly appreciated.

g1smd

10:37 pm on Mar 19, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Don't change the server around, program it in your application instead.

asprinwizard

2:19 pm on Mar 20, 2008 (gmt 0)

10+ Year Member



Thanks. How do I do this?

Is it the 'date_default_timezone_set' php function or something else?

Thanks for your help.