Skip to content

Commit

Permalink
Apply system timezone to slack notification (#1213)
Browse files Browse the repository at this point in the history
  • Loading branch information
tazu-yyy authored and stevecrozz committed Jul 5, 2018
1 parent 099860e commit d86dead
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/models/notification_services/slack_service.rb
Expand Up @@ -70,7 +70,8 @@ def post_payload_fields(problem)
{ title: "Environment", value: problem.environment, short: true },
{ title: "Times Occurred", value: problem.notices_count.try(:to_s),
short: true },
{ title: "First Noticed", value: problem.first_notice_at.try(:to_s, :db),
{ title: "First Noticed",
value: problem.first_notice_at.try(:localtime).try(:to_s, :db),
short: true },
{ title: "Backtrace", value: backtrace_lines(problem), short: false }
]
Expand Down
2 changes: 1 addition & 1 deletion spec/models/notification_service/slack_service_spec.rb
Expand Up @@ -63,7 +63,7 @@
},
{
title: "First Noticed",
value: problem.first_notice_at.try(:to_s, :db),
value: problem.first_notice_at.try(:localtime).try(:to_s, :db),
short: true
},
{
Expand Down

0 comments on commit d86dead

Please sign in to comment.