Skip to content

Instantly share code, notes, and snippets.

@nfarring
Last active August 29, 2015 14:14
Show Gist options
  • Save nfarring/a6ed4696353c87ae712d to your computer and use it in GitHub Desktop.
Save nfarring/a6ed4696353c87ae712d to your computer and use it in GitHub Desktop.
Computes an ISO 8601-compatible datestamp for use with naming files.
from time import strftime as _strftime
def iso8601():
"""Returns an ISO 8601-compatible datestamp for use with naming files."""
return _strftime('%Y%m%dT%H%M%S')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment