Update GetUnix parse in location

tags/v1.0.10 v1.0.10
Stanly 4 years ago
parent 7ca8b5f462
commit 603578a494

@ -28,7 +28,7 @@ func GetUnixNow() Timestamp {
// GetUnix 嘗試取得時間戳記 // GetUnix 嘗試取得時間戳記
func GetUnix(format, datetime string) (Timestamp, error) { func GetUnix(format, datetime string) (Timestamp, error) {
t, err := time.Parse(format, datetime) t, err := time.ParseInLocation(format, datetime, Local)
return Timestamp(t.Unix()), err return Timestamp(t.Unix()), err
} }

Loading…
Cancel
Save