Difference between revisions of "Computer time"
From Teknologisk videncenter
m (Created page with "=Challenges= If you were tasked to write a program that would beep 100 minutes into the future based on local date and time clock. Sounds simple enough, but take these examples i...") |
m |
||
Line 1: | Line 1: | ||
=Challenges= | =Challenges= | ||
− | If you were tasked to write a program that would | + | If you were tasked to write a program that would calculate date and time 100 minutes into the future based on local date and time clock. Sounds simple enough, but take these examples into consideration: |
#Program starts 7 minutes before new year | #Program starts 7 minutes before new year | ||
− | # or 3 minutes before changing to summer time adding one hour to local time. Would your program | + | # or 3 minutes before changing to summer time adding one hour to local time. Would your program show the time after 40 or 100 minutes? |
# or 70 minutes before changing back from summertime to normal time removing one hour. | # or 70 minutes before changing back from summertime to normal time removing one hour. | ||
# or how about 23:58 February 28<sup>th</sup> before a leap year or if a leap second was introduced. | # or how about 23:58 February 28<sup>th</sup> before a leap year or if a leap second was introduced. |
Revision as of 11:05, 9 July 2013
Challenges
If you were tasked to write a program that would calculate date and time 100 minutes into the future based on local date and time clock. Sounds simple enough, but take these examples into consideration:
- Program starts 7 minutes before new year
- or 3 minutes before changing to summer time adding one hour to local time. Would your program show the time after 40 or 100 minutes?
- or 70 minutes before changing back from summertime to normal time removing one hour.
- or how about 23:58 February 28th before a leap year or if a leap second was introduced.