From 5c85fdbc324c770c0ed8e3640a6dc7311e30df0e Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Fri, 31 Mar 2023 08:26:53 -0400 Subject: [PATCH] Fix typo in code Related feedback: - https://github.com/uBlockOrigin/uBlock-issues/issues/2570#issuecomment-1491616007 --- src/js/storage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/storage.js b/src/js/storage.js index 6ab7bd59e..b15d8ff20 100644 --- a/src/js/storage.js +++ b/src/js/storage.js @@ -520,13 +520,13 @@ self.addEventListener('hiddenSettingsChanged', ( ) => { ) { const d = new Date(); // Date in YYYY-MM-DD format - https://stackoverflow.com/a/50130338 - const ISO8061Date = new Date(d.getTime() + + const ISO8601Date = new Date(d.getTime() + (d.getTimezoneOffset()*60000)).toISOString().split('T')[0]; const url = new URL(options.docURL); comment = '! ' + this.hiddenSettings.autoCommentFilterTemplate - .replace('{{date}}', ISO8061Date) + .replace('{{date}}', ISO8601Date) .replace('{{time}}', d.toLocaleTimeString()) .replace('{{hostname}}', url.hostname) .replace('{{origin}}', url.origin)