diff --git a/server/http_loadpoint_handler.go b/server/http_loadpoint_handler.go index d7ec80a67..a4cb27fb4 100644 --- a/server/http_loadpoint_handler.go +++ b/server/http_loadpoint_handler.go @@ -74,7 +74,7 @@ func planPreviewHandler(lp loadpoint.API) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { vars := mux.Vars(r) - planTime, err := time.Parse(time.RFC3339, vars["time"]) + planTime, err := time.ParseInLocation(time.RFC3339, vars["time"], nil) if err != nil { jsonError(w, http.StatusBadRequest, err) return @@ -131,7 +131,7 @@ func planEnergyHandler(lp loadpoint.API) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { vars := mux.Vars(r) - ts, err := time.Parse(time.RFC3339, vars["time"]) + ts, err := time.ParseInLocation(time.RFC3339, vars["time"], nil) if err != nil { jsonError(w, http.StatusBadRequest, err) return diff --git a/server/http_vehicle_handler.go b/server/http_vehicle_handler.go index 2682653db..ace17293d 100644 --- a/server/http_vehicle_handler.go +++ b/server/http_vehicle_handler.go @@ -78,7 +78,7 @@ func planSocHandler(site site.API) http.HandlerFunc { return } - ts, err := time.Parse(time.RFC3339, vars["time"]) + ts, err := time.ParseInLocation(time.RFC3339, vars["time"], nil) if err != nil { jsonError(w, http.StatusBadRequest, err) return