From 603578a4945f88052767d740f01a9605eed49ceb Mon Sep 17 00:00:00 2001 From: Stanly Date: Mon, 31 Aug 2020 18:27:18 +0800 Subject: [PATCH] Update GetUnix parse in location --- types/timestamp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/timestamp.go b/types/timestamp.go index 460049d..b7479ee 100644 --- a/types/timestamp.go +++ b/types/timestamp.go @@ -28,7 +28,7 @@ func GetUnixNow() Timestamp { // GetUnix 嘗試取得時間戳記 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 }