1 Reply Latest reply on Apr 5, 2007 9:49 AM by Rothrock

    Timezone

    skogsmus
      Ok a little background info:

      I have a countdown script that reads the server time from a mktime php file (xml type)
      It works great UNTIL i change the timezone.

      Is it possible to static set the timezone, so it doesnt mather from what timezone the user comes from, it will use the servers timezone??? :)'

      Thanx in advance!

      CODE:

        • 1. Re: Timezone
          Rothrock Level 5
          Far too much code.

          If you are correctly getting the time from a server then you have done what you need to.

          Any line like this:

          temp_date = new Date (msecs);

          Is going to access the user's internal clock.

          I would suggest that you do a getTimer() once you have received the correct time from the server. Then everytime you need to know how long has passed since that time was received you just use another getTimer() and do a bit of subtraction. You will then know how many milliseconds have passed since that time and can do your countdown.