Created
September 4, 2009 22:48
-
-
Save seancribbs/181197 to your computer and use it in GitHub Desktop.
This file contains 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 timezone=(value) | |
# Normalizes TZInfo names into their Rails equivalents | |
Time.use_zone(value) do | |
self[:timezone] = ActiveSupport::TimeZone::MAPPING.index(Time.zone.name) || Time.zone.name | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment