sure but the site is displaying the time in major cities round the world, not local time for the user

eg: on my contact form http://www.bhatt.id.au/contactus.php the PHP code has daylight savings logic in it,

This is because I am in NSW (with daylight savings Nov-Mar), and my server is in Queensland (with no daylight savings Nov-Mar), and so I have to add a 1 hour offet to the server time between Nov-Mar to ensure it displays the correct time in Sydney

Neerav Bhatt
http://www.bhatt.id.au
Web Development & IT consultancy

http://www.bhatt.id.au/blog/ - Ramblings Thoughts
http://www.bhatt.id.au/photos/
http://www.bookcrossing.com/mybookshelf/neerav

Rick Faaberg wrote:
On 11/10/04 1:44 AM "Neerav" <[EMAIL PROTECTED]> sent this out:


The time for Sydney is also one hour off, it says 07:40 PM when it
should be 08:40PM

looks like you need to add some backend logic to adjust dates for
daylight savings


PHP always uses server time AFAIK and there's no way to adjust for time
zones since PHP cannot determine what time zone a client is in, at least in
the research I did a couple of years ago.

Javascript can use the client computer's clock time, but PHP cannot as it's
a server-side language.

Rick Faaberg

******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************
******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************



Reply via email to