Skip to content

Instantly share code, notes, and snippets.

@zerossB

zerossB/date-hour.py

Created Dec 30, 2017
Embed
What would you like to do?
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