Skip to content

Instantly share code, notes, and snippets.

@alfie-max
Last active July 1, 2016 08:01
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 alfie-max/d96a1d93ad45f0ddc87563de11ac7c23 to your computer and use it in GitHub Desktop.
Save alfie-max/d96a1d93ad45f0ddc87563de11ac7c23 to your computer and use it in GitHub Desktop.
# Default Output
2.3.1 :004 > e.start_time.to_json
=> "\"2016-07-11T00:00:00.000Z\""
2.3.1 :010 > e.start_time.to_time.to_json
=> "\"2016-07-11T00:00:00.000+00:00\""
# Expected Output
2.3.1 :009 > e.start_time.strftime("%Y-%m-%dT%H:%M:%S").to_json
=> "\"2016-07-11T00:00:00\""
# Is there a better way to this than explicitly using `strftime`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment