Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4e64abe

Browse files
committed
bugfix
1 parent e055ef5 commit 4e64abe

File tree

1 file changed

+2
-7
lines changed
  • websites/code2/studygolang/src/logic

1 file changed

+2
-7
lines changed

websites/code2/studygolang/src/logic/email.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,8 @@ func (self EmailLogic) SendResetpwdMail(email, uuid string) {
9393

9494
// 自定义模板函数
9595
var emailFuncMap = template.FuncMap{
96-
"time_format": func(s string) string {
97-
t, err := time.ParseInLocation("2006-01-02 15:04:05", s, time.Local)
98-
if err != nil {
99-
return s
100-
}
101-
102-
return t.Format("01-02")
96+
"time_format": func(t model.OftenTime) string {
97+
return time.Time(t).Format("01-02")
10398
},
10499
"substring": util.Substring,
105100
}

0 commit comments

Comments
 (0)