summaryrefslogtreecommitdiffstats
path: root/api/post.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-12-10 13:44:11 -0500
committerChristopher Speller <crspeller@gmail.com>2015-12-10 13:44:11 -0500
commit149ac6f3ce52a5ff5d9083191278b1fc140ba8a6 (patch)
treebce32b0142a0b45446a9a2d0c6ff65434644ff11 /api/post.go
parentaef16866066c8fec2529e57a9659fd3cb03acc91 (diff)
parentb8efeb2e72475378c7f58e1c8367f8b4da9b7efd (diff)
downloadchat-149ac6f3ce52a5ff5d9083191278b1fc140ba8a6.tar.gz
chat-149ac6f3ce52a5ff5d9083191278b1fc140ba8a6.tar.bz2
chat-149ac6f3ce52a5ff5d9083191278b1fc140ba8a6.zip
Merge pull request #1648 from npcode/notification-email-local-timezone
Use local timezone for notification email
Diffstat (limited to 'api/post.go')
-rw-r--r--api/post.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/post.go b/api/post.go
index 6736d75e2..5fbacc906 100644
--- a/api/post.go
+++ b/api/post.go
@@ -477,8 +477,7 @@ func sendNotificationsAndForget(c *Context, post *model.Post, team *model.Team,
teamURL := c.GetSiteURL() + "/" + team.Name
// Build and send the emails
- location, _ := time.LoadLocation("UTC")
- tm := time.Unix(post.CreateAt/1000, 0).In(location)
+ tm := time.Unix(post.CreateAt/1000, 0)
subjectPage := NewServerTemplatePage("post_subject")
subjectPage.Props["SiteURL"] = c.GetSiteURL()
@@ -510,6 +509,7 @@ func sendNotificationsAndForget(c *Context, post *model.Post, team *model.Team,
bodyPage.Props["Minute"] = fmt.Sprintf("%02d", tm.Minute())
bodyPage.Props["Month"] = tm.Month().String()[:3]
bodyPage.Props["Day"] = fmt.Sprintf("%d", tm.Day())
+ bodyPage.Props["TimeZone"], _ = tm.Zone()
bodyPage.Props["PostMessage"] = model.ClearMentionTags(post.Message)
bodyPage.Props["TeamLink"] = teamURL + "/channels/" + channel.Name