diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-05 06:26:43 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-05 06:26:43 +0900 |
| commit | 4bd7cb8d5e02187d30918fa09e98e61396827154 (patch) | |
| tree | afb9d72c79aee16809294b95bad5b0799fe98df9 /backend | |
| parent | f3c10e6857e86f6ed10a5308f7c020fcfc66d18d (diff) | |
| download | iosdc-japan-2025-albatross-4bd7cb8d5e02187d30918fa09e98e61396827154.tar.gz iosdc-japan-2025-albatross-4bd7cb8d5e02187d30918fa09e98e61396827154.tar.zst iosdc-japan-2025-albatross-4bd7cb8d5e02187d30918fa09e98e61396827154.zip | |
fix(backend): fix `started_at` format
Diffstat (limited to 'backend')
| -rw-r--r-- | backend/admin/handlers.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/backend/admin/handlers.go b/backend/admin/handlers.go index d9a6977..d445de8 100644 --- a/backend/admin/handlers.go +++ b/backend/admin/handlers.go @@ -126,7 +126,7 @@ func (h *AdminHandler) getGames(c echo.Context) error { for i, g := range rows { var startedAt string if !g.StartedAt.Valid { - startedAt = g.StartedAt.Time.In(jst).Format("2006-01-02T15:04:05") + startedAt = g.StartedAt.Time.In(jst).Format("2006-01-02T15:04") } games[i] = echo.Map{ "GameID": g.GameID, @@ -161,7 +161,7 @@ func (h *AdminHandler) getGameEdit(c echo.Context) error { var startedAt string if !row.StartedAt.Valid { - startedAt = row.StartedAt.Time.In(jst).Format("2006-01-02T15:04:05") + startedAt = row.StartedAt.Time.In(jst).Format("2006-01-02T15:04") } return c.Render(http.StatusOK, "game_edit", echo.Map{ @@ -214,7 +214,7 @@ func (h *AdminHandler) postGameEdit(c echo.Context) error { { startedAtRaw := c.FormValue("started_at") if startedAtRaw != "" { - startedAtTime, err := time.Parse("2006-01-02T15:04:05", startedAtRaw) + startedAtTime, err := time.Parse("2006-01-02T15:04", startedAtRaw) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, "Invalid started_at") } |
