Skip to content

Instantly share code, notes, and snippets.

@zerossB
Created December 30, 2017 19:06
Show Gist options
  • Save zerossB/2f816d6eaf53cdd79611acfa72716ee4 to your computer and use it in GitHub Desktop.
Save zerossB/2f816d6eaf53cdd79611acfa72716ee4 to your computer and use it in GitHub Desktop.
from datetime import datetime, timedelta
now = datetime.now()
print("Tupla de Datetime: " + str(now))
td = timedelta(hours=2)
print("Time delta: " + str(td) + "\n")
print("Hora Atual " + str(now))
print("+2 horas " + str(now + td))
print("-2 horas " + str(now - td))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment