Skip to content

Instantly share code, notes, and snippets.

@pbojinov
Created March 26, 2014 07:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pbojinov/9778414 to your computer and use it in GitHub Desktop.
Save pbojinov/9778414 to your computer and use it in GitHub Desktop.
using python datetime for current time and time next year
from datetime import timedelta, datetime
# current time
now = datetime.now()
print now
# a year from now
next_year = (datetime.today()+ timedelta(days=365))
print next_year
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment