From 2d94e558e7be56b98e6fdb2b4d24eb5afd00a437 Mon Sep 17 00:00:00 2001 From: Chantell Osejo <6220053+chantellosejo@users.noreply.github.com> Date: Sat, 20 Jul 2024 12:47:11 +0200 Subject: [PATCH] Fix timezone bug in getDate() Use of "PST" is problematic as it doesn't work during "PDT". Switched to the daylight savings time neutral "America/Los_Angeles" instead --- Neopets - Battledome Set Selector.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Neopets - Battledome Set Selector.user.js b/Neopets - Battledome Set Selector.user.js index 7b1fb2f..9a341e0 100644 --- a/Neopets - Battledome Set Selector.user.js +++ b/Neopets - Battledome Set Selector.user.js @@ -1418,7 +1418,7 @@ function clone(data) { } function getDate() { - return new Date().toLocaleString("en-US", {timeZone: "PST"}).slice(0, 10).replace(",","") + return new Date().toLocaleString("en-US", {timeZone: "America/Los_Angeles"}).slice(0, 10).replace(",","") } function getItemURL(node, ability=false) { @@ -1820,4 +1820,4 @@ function addFightCSS() { border-radius: 50%; } ` -} \ No newline at end of file +}