Browse Source

date time parse

ls 3 years ago
parent
commit
fa8512ec2f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      util/date.go

+ 2 - 2
util/date.go

@@ -56,8 +56,8 @@ func TimeFmtStr(t time.Time, fmt string) string {
 
 // StrToDate 字符串转日期
 func StrToDate(s string) (t time.Time, err error) {
-	t, err = time.ParseInLocation(DateFmtLong, s, time.Local)
-
+	//t, err = time.ParseInLocation(DateFmtLong, s, time.Local)
+	t, err = time.Parse(DateFmtLong, s)
 	return
 }