Skip to content

Instantly share code, notes, and snippets.

@bmcculley
Last active January 10, 2022 00:34
Show Gist options
  • Save bmcculley/7f25813292e1e92fc0b7 to your computer and use it in GitHub Desktop.
Save bmcculley/7f25813292e1e92fc0b7 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
from datetime import datetime, timedelta
import sys
def timeFormatted(hoursNum):
ftime = datetime.now() + timedelta(hours=hoursNum)
return '{:%H:%M:%S}'.format(ftime)
elapse = 8
for n, i in enumerate(sys.argv):
if n > 0:
elapse = int(i)
print timeFormatted(elapse)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment