summaryrefslogtreecommitdiff
path: root/app/helpers/time_zone_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/time_zone_helper.rb')
-rw-r--r--app/helpers/time_zone_helper.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/helpers/time_zone_helper.rb b/app/helpers/time_zone_helper.rb
index f92e32ff9b6..a0d9c8403e8 100644
--- a/app/helpers/time_zone_helper.rb
+++ b/app/helpers/time_zone_helper.rb
@@ -33,6 +33,8 @@ module TimeZoneHelper
end
def local_time(timezone)
+ return if timezone.blank?
+
time_zone_instance = ActiveSupport::TimeZone.new(timezone) || Time.zone
time_zone_instance.now.strftime("%-l:%M %p")
end