설명
컴퓨터의 UTC(세계시 좌표) 시간을 보고합니다.
스크립트 코드
var wbemFlagReturnImmediately = 0x10;
var wbemFlagForwardOnly = 0x20;
var objWMIService = GetObject("winmgmts:\\.\root\CIMV2");
var colItems = objWMIService.ExecQuery("SELECT * FROM Win32_UTCTime", "WQL",
wbemFlagReturnImmediately | wbemFlagForward 만);
var enumItems = new Enumerator(colItems);
for (; !enumItems.atEnd(); enumItems.moveNext()) {
var objItem = enumItems.item();
WScript.Echo("일: " objItem.Day);
WScript.Echo("요일: " objItem.DayOfWeek);
WScript.Echo("시간: " objItem.Hour);
WScript.Echo("밀리초: " objItem.Milliseconds);
WScript.Echo("분: " objItem.Minute);
WScript.Echo("월: " objItem.Month);
WScript.Echo("분기: " objItem.Quarter);
WScript.Echo("두 번째: " objItem.Second);
WScript.Echo("월별 주: " objItem.WeekInMonth);
WScript.Echo("연도: " objItem.Year);
WScript.Echo();
}