Quellcode durchsuchen

date time parse

ls vor 4 Jahren
Ursprung
Commit
fa8512ec2f
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  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
 }