From ca022d8c2d2d8b2e149fd34a696284759e566f4e Mon Sep 17 00:00:00 2001 From: earthlng Date: Fri, 10 Mar 2023 09:21:21 +0000 Subject: [PATCH] v4.19 - use Powershell for locale-independent TS --- updater.bat | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/updater.bat b/updater.bat index 40a6d10..f6174f7 100644 --- a/updater.bat +++ b/updater.bat @@ -3,10 +3,10 @@ TITLE arkenfox user.js updater REM ## arkenfox user.js updater for Windows REM ## author: @claustromaniac -REM ## version: 4.18 +REM ## version: 4.19 REM ## instructions: https://github.com/arkenfox/user.js/wiki/5.1-Updater-[Options]#-windows -SET v=4.18 +SET v=4.19 VERIFY ON CD /D "%~dp0" @@ -177,8 +177,7 @@ IF EXIST user.js.new ( IF DEFINED _singlebackup ( MOVE /Y user.js user.js.bak >nul ) ELSE ( - FOR /F "usebackq tokens=1,2 delims==" %%i IN (`wmic os get LocalDateTime /VALUE 2^>NUL`) DO IF '.%%i.'=='.LocalDateTime.' SET ldt=%%j - SET ldt=!ldt:~0,8!_!ldt:~8,6! + FOR /F "delims=" %%# IN ('powershell get-date -format "{yyyyMMdd_HHmmss}"') DO @SET ldt=%%# MOVE /Y user.js "user-backup-!ldt!.js" >nul ) REN user.js.new user.js