allow timezone parameters to work correctly with charts

This commit is contained in:
Lee Lawlor
2014-08-05 12:20:10 -04:00
parent 7b44f08dd5
commit 868882a0c9
3 changed files with 14 additions and 3 deletions

View File

@ -328,6 +328,9 @@ class ApplicationController < ActionController::Base
# use the offset to find an appropriate timezone
def set_timezone_from_offset(offset)
offset = offset.to_i
# always set to UTC if offset is 0
return 'UTC' if offset == 0
# keep track of the currently matched time zone
current_zone = nil