Digital Clock

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rajesh kanna
    New Member
    • Aug 2008
    • 1

    Digital Clock

    I created Digital Clock.In that I want to display the Timezones of different countries when the user selects the particular zone...please help me how to get the time zones.......
  • Fabez
    New Member
    • Oct 2008
    • 29

    #2
    You will need to add or subtract the appropriate amount of hours from the current time.

    Comment

    • joedeene
      Contributor
      • Jul 2008
      • 579

      #3
      You are using dynamic text boxes to display your time right? I don't know if you are using different ones for the Hour and Minutes, which I would suggest, because if so, like Fabez has said, you can add the number of hours from the currently selected timezone. Here's a code sample that worked for me, just change the hour, and make an If Else statement like if the hour is greater than 24 then set it to 0, after tracking how many numbers have been subtracted already.

      Code:
      var currenttimezone:Number = 0;
      var timezonehourtoadd:Number = 5;
      myHourDynamicTextBox.text = currenttimezone+timezonehourtoadd;
      ...if you need further assistance let me know, and if you could post some part of what you have coded we could assist in a manner useful to you.

      joedeene

      Comment

      Working...