Add localized timestamp support for email notification (#8674)

* Add localized timestamp support for email notification

* Move localTime logic over to getFormattedPostTime
Этот коммит содержится в:
Chris Duarte
2018-07-13 11:10:34 -07:00
коммит произвёл Jesse Hallam
родитель 17f211c393
Коммит 62c64594cc
3 изменённых файлов: 209 добавлений и 34 удалений

Просмотреть файл

@@ -497,6 +497,14 @@ func (u *User) IsSAMLUser() bool {
return u.AuthService == USER_AUTH_SERVICE_SAML
}
func (u *User) GetPreferredTimezone() string {
if u.Timezone["useAutomaticTimezone"] == "true" {
return u.Timezone["automaticTimezone"]
}
return u.Timezone["manualTimezone"]
}
// UserFromJson will decode the input and return a User
func UserFromJson(data io.Reader) *User {
var user *User