Red Hat Bugzilla – Bug 1301575
apply-updates.bat in jon-server-3.3-update-04.zip only works reliably in the USA
Last modified: 2016-07-27 11:32:25 EDT
Download "jon-server-3.3-update-04.zip" on a Windows machine.
In "apply-updates.bat" we have:
rem Calculate time stamp.
On a UK machine:
ECHO is on. (the result is an empty string, so it reacts to just 'echo')
On a Dutch machine:
In other words: the string manipulation will only work reliable if used on a United States machine. In other countries, this will not only fail to get the correct date, but will make the script break when using these as a filename.
- do no presume everyone is US based.
- port the script use Powershell, which since Windows Vista is always available.
- use wmic:
for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set DT=%%a
-> YYYYMMDD or use 2,8 to get YYMMDD if you prefer
Moving to ON_QA as available to test with JON 3.3.6 DR01 brew build:
Verified on version : 3.3.0.GA Update 06 Build Number : 675641d:2fcd5b7
Verified on Windows Server 2008 R2 with Dutch and English(UK) system locale. apply-updates.bat on JON 3.3GA works successfully.
Also verified apply-updates.sh on RHEL 7.2 with Dutch system locale.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.