Skip to content

Instantly share code, notes, and snippets.

@doyle
Last active June 12, 2019 19:35
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 doyle/896744982904354ac2a76e2fb2d6b718 to your computer and use it in GitHub Desktop.
Save doyle/896744982904354ac2a76e2fb2d6b718 to your computer and use it in GitHub Desktop.
Shows common ways of formatting dates as strings
# 2019-10-14 14:32:55 -0400
Time.now.strftime('%Y-%m-%d %H:%M:%S %z')
# 2019-10-14 14:35:18.969 -0400
Time.now.strftime('%Y-%m-%d %H:%M:%S.%L %z')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment