Skip to content

Commit ca022d8

Browse files
authored
v4.19 - use Powershell for locale-independent TS
1 parent 7388485 commit ca022d8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

updater.bat

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ TITLE arkenfox user.js updater
33

44
REM ## arkenfox user.js updater for Windows
55
REM ## author: @claustromaniac
6-
REM ## version: 4.18
6+
REM ## version: 4.19
77
REM ## instructions: https://github.com/arkenfox/user.js/wiki/5.1-Updater-[Options]#-windows
88

9-
SET v=4.18
9+
SET v=4.19
1010

1111
VERIFY ON
1212
CD /D "%~dp0"
@@ -177,8 +177,7 @@ IF EXIST user.js.new (
177177
IF DEFINED _singlebackup (
178178
MOVE /Y user.js user.js.bak >nul
179179
) ELSE (
180-
FOR /F "usebackq tokens=1,2 delims==" %%i IN (`wmic os get LocalDateTime /VALUE 2^>NUL`) DO IF '.%%i.'=='.LocalDateTime.' SET ldt=%%j
181-
SET ldt=!ldt:~0,8!_!ldt:~8,6!
180+
FOR /F "delims=" %%# IN ('powershell get-date -format "{yyyyMMdd_HHmmss}"') DO @SET ldt=%%#
182181
MOVE /Y user.js "user-backup-!ldt!.js" >nul
183182
)
184183
REN user.js.new user.js

0 commit comments

Comments
 (0)