Browse Source

fix: datetime parsing consistent across browsers

jamesread 5 months ago
parent
commit
a44087631f
1 changed files with 1 additions and 1 deletions
  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
   // Update rate limit store from logEntry if rate limit expiry datetime is provided
   if (logEntry && logEntry.datetimeRateLimitExpires && logEntry.bindingId) {
   if (logEntry && logEntry.datetimeRateLimitExpires && logEntry.bindingId) {
     // Parse datetime string "2006-01-02 15:04:05" and convert to Unix timestamp
     // 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
     rateLimits[logEntry.bindingId] = date.getTime() / 1000
   } else if (logEntry && logEntry.bindingId) {
   } else if (logEntry && logEntry.bindingId) {
     // Clear rate limit if not set
     // Clear rate limit if not set