Created
May 16, 2016 04:10
-
-
Save joshco/6702afcdde07d6d8ea00f28dfd7109ae to your computer and use it in GitHub Desktop.
Parse time as in zone
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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