📄 JScript (WSH)
Get Time Zone Settings Report (JScript)
Queries Win32_TimeZone via WMI and prints Time Zone Settings to the console — JScript, VBScript's WSH sibling language.
GetTimeZoneReport.js
// ============================================================
// GetTimeZoneReport.js
//
// Reports Time Zone Settings via WMI (Win32_TimeZone). JScript (Windows Script Host) —
// VBScript's sibling language, run the same way via cscript/wscript.
//
// Usage: cscript GetTimeZoneReport.js
// ============================================================
var objWMIService = GetObject("winmgmts:\\\\.\\root\\cimv2");
var colItems = objWMIService.ExecQuery("SELECT Description, Bias, StandardName FROM Win32_TimeZone");
var e = new Enumerator(colItems);
var output = "";
var count = 0;
for (; !e.atEnd(); e.moveNext()) {
var item = e.item();
output += "Description: " + item.Description + "\n";
output += "Bias: " + item.Bias + "\n";
output += "StandardName: " + item.StandardName + "\n";
output += new Array(41).join("-") + "\n";
count++;
}
if (count === 0) {
WScript.Echo("No Time Zone Settings found.");
} else {
WScript.Echo(output);
}