Skip to content

Instantly share code, notes, and snippets.

@francois-blanchard
Created June 12, 2014 08:18
Show Gist options
  • Save francois-blanchard/a926d5c94cf4f75aca57 to your computer and use it in GitHub Desktop.
Save francois-blanchard/a926d5c94cf4f75aca57 to your computer and use it in GitHub Desktop.
Parse DateTime rails with correct timezone
> Time.zone
=> (GMT+01:00) Europe/Paris
> Time.zone.parse("07/06/2017 16:00").to_datetime
=> Wed, 07 Jun 2017 16:00:00 +0200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment