From 269bb76c8389d2e0189c56d11ef771f0402792c9 Mon Sep 17 00:00:00 2001 From: andig Date: Tue, 23 Apr 2024 10:59:19 +0200 Subject: [PATCH] Ocpp: fix status ignored when timestamp identical --- charger/ocpp/connector_core.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charger/ocpp/connector_core.go b/charger/ocpp/connector_core.go index 453550b7f3..fbdc3c52f5 100644 --- a/charger/ocpp/connector_core.go +++ b/charger/ocpp/connector_core.go @@ -20,7 +20,7 @@ func (conn *Connector) timestampValid(t time.Time) bool { } // reject older values than we already have - return t.After(conn.status.Timestamp.Time) + return !t.Before(conn.status.Timestamp.Time) } func (conn *Connector) StatusNotification(request *core.StatusNotificationRequest) (*core.StatusNotificationConfirmation, error) {