Explorar el Código

fix: datetime parsing consistent across browsers

jamesread hace 5 meses
padre
commit
a44087631f
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      frontend/js/websocket.js

+ 1 - 1
frontend/js/websocket.js

@@ -70,7 +70,7 @@ function onExecutionChanged (evt) {
   // Update rate limit store from logEntry if rate limit expiry datetime is provided
   if (logEntry && logEntry.datetimeRateLimitExpires && logEntry.bindingId) {
     // Parse datetime string "2006-01-02 15:04:05" and convert to Unix timestamp
-    const date = new Date(logEntry.datetimeRateLimitExpires.replace(' ', 'T'))
+    const date = new Date(logEntry.datetimeRateLimitExpires.replace(' ', 'T') + 'Z')
     rateLimits[logEntry.bindingId] = date.getTime() / 1000
   } else if (logEntry && logEntry.bindingId) {
     // Clear rate limit if not set