6 Replies Latest reply on May 23, 2006 1:04 AM by sun4none

    adjusting time zones

    sun4none
      okay people! emergency here! have to set up 2 clocks.. one showing New Jersey time and another showing Indian (Calcutta) time! how??? thank you!
        • 1. Re: adjusting time zones
          xJaNx
          www.actionscript.org there are a few tutorials with clocks on there
          • 2. Re: adjusting time zones
            ogousa-swS9lV
            You have to use UTC time (Greenwich time) and add time zone value.
            For New Jersey it is -5 hours, for Calcutta it is +5.5 hours.
            The real problem is DaylightSavingTime!
            There are no common rules to calculate it. Each country has it's own rules!
            For New Jersey you have to add +1 hour, but olny until October 29, 1:00am.
            India doesn't use DaylightSavingTime.
            If it is an emergency(!) and if you are in New Jersey(!), you can use your local current time and just add 9 hours and 30 minutes.
            You have time till the end of October to create a database of DaylightSavingTime rules and add some code to use it
            The simplest solution - use my website Matter of Time
            • 3. Re: adjusting time zones
              NSurveyor Level 2
              Using system clock isn't a good idea. You are assuming that the user has the correct time. You need a server clock perhaps, or use a webservice.
              • 4. Re: adjusting time zones
                Level 7
                On 2006-05-22 21:53:55 +0100, "NSurveyor" <saif7463@yahoo.com> said:

                > Using system clock isn't a good idea. You are assuming that the user
                > has the correct time. You need a server clock perhaps, or use a
                > webservice.

                You want to know where the centre of the world is?
                It's in the middle of the map, at the top.
                London. Greenwich. Where time was told to grow up.

                OK - that was a plug for my home town but the reality is that GMT is
                international standard time
                and all other things are measured to, or from it. UTC is an American
                invention and the rest of the world
                has never heard of it. Use GMT (Greeenwhich mean time) via the atomic
                time server at Greenwich (free to
                connect to) and use the free database of time difference they provide
                to have your two clocks work always
                and forever in perfect harmony - including English summertime, European
                summertime, US daylight saving,
                etc., etc., etc.,

                You want to travel through time?
                Come to london and stand on the meridian.
                One foot in today, the other in tomorrow.

                Want to get married ?
                Definitely marry her on the tomorrow foot.

                • 5. Re: adjusting time zones
                  NSurveyor Level 2
                  Interesting, where is the link to this atomic time server?

                  And just to let you know....

                  UTC = GMT

                  "The Date class lets you retrieve date and time values relative to universal time (Greenwich mean time, now called universal time or UTC) "
                  • 6. Re: adjusting time zones
                    sun4none Level 1
                    Thanks xJaNx, ogousa, NSurveyor, Tony Heagren for your contribution ... by the way Mr.Heagren can you name the server please.. it'll be of great help! Thank you!