I am confused about how this comes back:
def utc2user(t) ENV["TZ"] = current_user.time_zone_name res = t.getlocal ENV["TZ"] = "UTC" res end
First, it sets the ENV variable, then sets the "res" to a local value, then overrides the ENV variable, and then returns res?
Not sure if I understand how this happens with UTC in the user time zone?
ruby ruby-on-rails
Blankman
source share