TIME Script - Help
I have a script that shows the time from my HOSTING SERVER
I want the script to show New York, London, Moskow and Tokyo time based on my server time...
New York is my server time - 7 hours
London is my server time - 2 hours
Moscow is my server time + 1 hour
Tokyo is my server time + 7 hours
You can see the scource here:
I found a tutorial about offset here:
Can anyone help me with this?
Um...well if you follow the tutorial, you have your answer there. Hell, they even give you the function...all you need to do is put in your new time offsets.
It is a very common error to try to get the time in other timezones by using offsets from your own timezone without allowing for the fact that the offset might vary depending on the time of year. I assume you know about setting your clocks an hour ahead for part of the year.
The time in Japan is always (for twelve months a year) nine hours ahead of Greenwich Mean Time, if I remember correctly.
Try this PHP command:
<php echo 'Tokyo time: '.gmdate('Y-m-d H:i:s',time()+(9*60*60)) ?>
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)