Skip to content

Instantly share code, notes, and snippets.

@kirang89
Created April 18, 2013 08:24
Show Gist options
  • Save kirang89/5411132 to your computer and use it in GitHub Desktop.
Save kirang89/5411132 to your computer and use it in GitHub Desktop.
Better datetime representation
import datetime
datetime.datetime.utcnow().replace(microsecond=0)
#Example Output: datetime.datetime(2013, 4, 18, 8, 23, 29)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment