Skip to content

Instantly share code, notes, and snippets.

@joshco
Created May 16, 2016 04:10
Show Gist options
  • Save joshco/6702afcdde07d6d8ea00f28dfd7109ae to your computer and use it in GitHub Desktop.
Save joshco/6702afcdde07d6d8ea00f28dfd7109ae to your computer and use it in GitHub Desktop.
Parse time as in zone
def parse_as_zone(time_string, tzid)
Time.use_zone(tzid) do
Time.zone.parse(time_string)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment