Commit 61cd8ece authored by David Barr's avatar David Barr

Fix error in user calendar activities where timezone is incorrectly set

If a user's timezone is set to a blank string or an unknown timezone,
an error is raised. Use local_time_instance() to prevent this.
parent a0fd5611
......@@ -7,7 +7,7 @@
%li
%span.light.js-localtime{ :data => { :datetime => event.created_at.utc.strftime('%Y-%m-%dT%H:%M:%SZ'), :toggle => 'tooltip', :placement => 'top' } }
= sprite_icon('clock', css_class: 'gl-vertical-align-text-bottom')
= event.created_at.to_time.in_time_zone(@user.timezone).strftime('%-I:%M%P')
= event.created_at.to_time.in_time_zone(local_time_instance(@user.timezone)).strftime('%-I:%M%P')
- if event.visible_to_user?(current_user)
- if event.push_action?
#{event.action_name} #{event.ref_type}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment