Skip to content

Instantly share code, notes, and snippets.

@ycflame
Last active June 13, 2018 12:16
Show Gist options
  • Save ycflame/8433975 to your computer and use it in GitHub Desktop.
Save ycflame/8433975 to your computer and use it in GitHub Desktop.
datetime.now() without microseconds
import datetime
datetime.datetime.now().replace(microsecond=0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment