class Time
Public Instance Methods
convert_time_zone(to_zone)
click to toggle source
Useful but not thread safe!!!!
# File lib/time_zone_hack.rb, line 3 def convert_time_zone(to_zone) original_zone = ENV["TZ"] utc_time = dup.gmtime ENV["TZ"] = to_zone to_zone_time = utc_time.localtime ENV["TZ"] = original_zone return to_zone_time end