Advertisement
user_137

Untitled

Aug 26th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. from datetime import timedelta, timezone
  2. from datetime import datetime as dt
  3. from time import sleep
  4. end = dt(2018, 8, 30, 23, 30, 0)
  5. local = str(end.replace(tzinfo=timezone.utc).astimezone()).split(' ')[0][:-2]
  6. while True:
  7.     utc_time_on_your_pc = dt.utcnow().replace(microsecond=0)
  8.     print(f'\n\n{"*" * 36}\n')
  9.     print(f" Course ends on: {local[:-1]}")
  10.     if end - utc_time_on_your_pc > timedelta(0):
  11.         print(f"  and that's in: {end - utc_time_on_your_pc}")
  12.     print(f'\n{"*" * 36}')
  13.     sleep(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement