Skip to content

Commit 5dd393e

Browse files
authored
Merge pull request #501 from triax/develop
直前で欠席したりしたときのSlack通知の、日付がJSTになってない問題を修正
2 parents 86ddc0a + 6e96f10 commit 5dd393e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/api/events.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,11 @@ func shouldNoticeRSVPChangeToSlack(event models.Event, prev, next models.Partici
179179
}
180180

181181
func buildSlackMessageOfLastMinuteRSVPChange(m models.Member, e models.Event, p, n models.ParticipationType) (string, []slack.MsgOption) {
182+
loc := time.FixedZone("Asia/Tokyo", 9*60*60)
183+
start := e.Google.Start().In(loc)
182184
return "practice", []slack.MsgOption{
183185
slack.MsgOptionBlocks(
184-
slack.NewContextBlock("", slack.NewTextBlockObject(slack.MarkdownType, e.Google.Start().Format("2006/01/02 ")+e.Google.Title, false, false)),
186+
slack.NewContextBlock("", slack.NewTextBlockObject(slack.MarkdownType, start.Format("2006/01/02 ")+e.Google.Title, false, false)),
185187
slack.NewSectionBlock(slack.NewTextBlockObject(slack.MarkdownType, fmt.Sprintf("*%s ⇒ %s* %s", p, n, m.Name()), false, false), nil, nil),
186188
),
187189
}

0 commit comments

Comments
 (0)