Advertisement
user_137

Exam Timer

May 29th, 2013
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. import datetime
  2. from datetime import *
  3.  
  4. utc_time_on_your_pc = datetime.utcnow().replace(microsecond=0)
  5. start = datetime(2013, 5, 30, 14, 0, 0)
  6. finish = datetime(2013, 6, 4, 2, 0, 0)
  7. print '*******************************'
  8. if start - utc_time_on_your_pc > timedelta(0):
  9.     print " Exam starts in:", start - utc_time_on_your_pc
  10. print " Exam ends in:", finish - utc_time_on_your_pc
  11. print '*******************************'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement