Forum Moderators: coopster
I want to display "Good Afternoon (or evening or morning, depending on what time, anyway...)
Good Morning! Today is March 7, 2004 at 11:43pm.
Is there any way using PHP to detect the location of the users time zone using ip addresses or something and displaying there accurate date and time.
Any suggestions, pros?
Date and time:
help required on - redirect on time - script [webmasterworld.com]
bon jour.
I don't know if PHP can detect the time zone, but you could try a combination PHP/Javascript solution. Use PHP to set the standard time, and Javascript to convert it to local time before printing. If you do a Google search for something like Javascript Detect Time Zone, you should be able to find a few examples.
One problem I can foresee is page cacheing on the user's system and via provy servers. The time will only be correct when the PHP executes, so you might want to ensure the page always expires immediately.