From 1972d89e9347b03fef3e8de379f859781d405fcb Mon Sep 17 00:00:00 2001 From: halleyshx Date: Wed, 6 Apr 2022 23:14:35 +0800 Subject: [PATCH] fix bug of time parse by CleanupTestDatabase (#294) Co-authored-by: shihuixing --- env/env.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env/env.go b/env/env.go index 745142d..18b4e40 100644 --- a/env/env.go +++ b/env/env.go @@ -172,7 +172,7 @@ func (vEnv *VirtualEnv) CleanupTestDatabase() { continue } s := strings.Split(testDatabase, "_") - pastTime, err := time.Parse("060102150405", s[1]) + pastTime, err := time.ParseInLocation("060102150405", s[1], time.Local) if err != nil { common.Log.Error("CleanupTestDatabase compute pastTime Error: %s", err.Error()) continue -- GitLab