www.webdeveloper.com
Results 1 to 3 of 3

Thread: TIME Script - Help

  1. #1
    Join Date
    Dec 2005
    Posts
    10

    Unhappy 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:
    http://www.alexmos.com/mfs/intertime.shtml

    I found a tutorial about offset here:
    http://techrepublic.com.com/5100-3513-6016329.html

    Can anyone help me with this?

  2. #2
    Join Date
    Dec 2005
    Location
    Washington, DC
    Posts
    228
    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.

  3. #3
    Join Date
    Mar 2003
    Posts
    575
    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:
    Code:
    <php echo 'Tokyo time: '.gmdate('Y-m-d H:i:s',time()+(9*60*60)) ?>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles