0 Replies Latest reply on Mar 20, 2007 10:48 AM by BeckyLev

    UTC Time Zones printing hours 24+

    BeckyLev
      I have a clock actionscript that was made by someone else, and may not even be the most efficiently written.

      The goal is to display the correct time for chosen cities, based on UTC so the local clock is not an issue. Once I have my problem sorted out, I will have alternate files to account for DST.

      The script calls the time based on UTC and an offset, such as "(today_date.getUTCHours()+7)". There are handlers to convert the time to 12-hour clock settings (versus military time), and then to add AM or PM.

      Everything seems to work just fine until Midnight, where the time is displayed counting upwards (and still PM) as "24:01 PM" and so on. I've yet to catch the tail end where it switches back to displaying correctly, but it seems to be around 34 hours.

      I'm attaching the code as-is, for reference. If there's a better way to write it, I'm all ears, but I'd be happy for any fix that will display the time correctly.