From b21e4525eca3b326799c2521da76236623e2cc57 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 12 Mar 2025 02:56:53 +0900 Subject: fix(backend): treat started_at of game edit page as time in JST --- backend/admin/handler.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'backend') diff --git a/backend/admin/handler.go b/backend/admin/handler.go index 64f69d8..7ab6ffc 100644 --- a/backend/admin/handler.go +++ b/backend/admin/handler.go @@ -238,11 +238,12 @@ func (h *Handler) postGameEdit(c echo.Context) error { { startedAtRaw := c.FormValue("started_at") if startedAtRaw != "" { - startedAtTime, err := time.Parse("2006-01-02T15:04", startedAtRaw) + startedAtJST, err := time.ParseInLocation("2006-01-02T15:04", startedAtRaw, jst) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, "Invalid started_at") } - startedAt = &startedAtTime + startedAtUTC := startedAtJST.UTC() + startedAt = &startedAtUTC } } -- cgit v1.2.3-70-g09d2