mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-31 20:19:05 +08:00
Add user time zone
This commit is contained in:
parent
b89cc1745a
commit
193c4974d2
1 changed files with 4 additions and 1 deletions
|
@ -87,7 +87,10 @@ module Dashboard
|
|||
activity.each do |key, _value|
|
||||
object_name = activity.delete key if key.to_s.include? 'name'
|
||||
end
|
||||
activity[:last_change] = I18n.l(DateTime.parse(activity[:last_change]), format: :full_with_comma)
|
||||
activity[:last_change] = I18n.l(
|
||||
DateTime.parse(activity[:last_change]).in_time_zone(@user.settings[:time_zone] || 'UTC'),
|
||||
format: :full_with_comma
|
||||
)
|
||||
activity[:name] = escape_input(object_name)
|
||||
activity[:url] = generate_url(activity)
|
||||
activity unless activity[:name].empty?
|
||||
|
|
Loading…
Reference in a new issue