diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-03-12 02:56:53 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-03-12 02:56:53 +0900 |
| commit | b21e4525eca3b326799c2521da76236623e2cc57 (patch) | |
| tree | eac8d4dfa2eff252bc19bfb36cee3aa9b444db9a | |
| parent | 2af1295c221d5e1894178384c138aaaf8577e280 (diff) | |
| download | iosdc-japan-2025-albatross-b21e4525eca3b326799c2521da76236623e2cc57.tar.gz iosdc-japan-2025-albatross-b21e4525eca3b326799c2521da76236623e2cc57.tar.zst iosdc-japan-2025-albatross-b21e4525eca3b326799c2521da76236623e2cc57.zip | |
fix(backend): treat started_at of game edit page as time in JST
| -rw-r--r-- | backend/admin/handler.go | 5 |
1 files changed, 3 insertions, 2 deletions
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 } } |
