Hi all,
I am new member to the list, let's see ;)
I am hosting my site in a shared hosting plan in US while I am in Saudi Arabia. I want to show the current datetime at my local. Should I use setlocale()? I mean is there a way which will give me the local datetime without calculating the difference manually?
Time is going to come from the server that your site is hosted on, so you'll have to calculate manually. for different time zones.
Suppose that I want to show the local datetime to my site visitors locals. That means if my visitor is coming from France, I have to show him France datetime. I he is coming form England, I should show his local also.
You'll have to figure out where they are by using something like ip -> country (if they're not some sort of "registered user" to your site), and that's not too accurate. Not to mention that dealing with countries which have multiple time zones.
-- By-Tor.com It's all about the Rush http://www.by-tor.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php