Gold University of Minnesota M. Skip to main content.University of Minnesota. Home page.
 
 
 

What's inside.

Announcements

Assignments

Lecture Notes

Office Hours

Our Class

References

Software Tools

Syllabus

Bulletin Board

Check grades  

CSCI 4131 Home

 
 

Printer-friendly version

 

Analog clock with timezones

Part 1) Javascript analog 12 hour clock. An analog clock shows us the time using 3 distinct needles. The needles rotate about an axis. This is how we define the clock. a) The 'second' needle: This needle rotates by 6degrees every second. The needle is also thinner than the other two needles, b) The 'minute' needle: This one rotates by 6 degrees every minute. c) The 'hour' needle: This rotates by 30 degrees every hour. This is also the shortest needle. d) At time T=0.00Hr or T=12.00 all three needles point in the same direction. We indicate that direction on the face of the clock by a number 12 e) Assuming '12' to be at the 0degree position '11' is at 30degrees, 10 at 60 degrees and so on. The angles increase in a clockwise direction. You job: Show me the clock described above on my browser. Use javascript. It should tell me the time. I should be able to see/distingiush the needles and their position with relative ease. Part 2) Configure the timezone of your clock. (Using a library) How to configure: Provide a means to select a City/State/Country. (Use your favourite selector). The clock should show the local time of the City/State/Country you have selected. If nothing is selected, your clock shows the system time. Using external libraries: You can use the fleegix timezone/date library for this. Download the library and find the instructions to use it at "http://js.fleegix.org". You are ofcourse free to use any other JS library you want. examples: http://www.fleegix.org/demo/xdate.html
You can see various analog clocks on the internet. You will need to make something like this or these.

Selecting time zones.

You can use a menu like. to select your time zones.

Grading(tentative):
Getting the correct time: 20%
Getting the correct rotations: 20%
Using the fleegix library for time offset: 20%
Changing time display WRT to time zone: 10%
Display ing the clock face: 10%
Javascript Code: 10%
Extra credits(For how your clock looks): Will be there, but amount not decided.
 
The University of Minnesota is an equal opportunity educator and employer.
Internet Programming