:: gmt.cmd Display the current time in GMT (World Time) @echo off setlocal set _key=HKLM\System\CurrentControlSet\Control\TimeZoneInformation :: find offset from GMT in minutes for /f "Tokens=3" %%G in ('reg query %_key% /V ActiveTimeBias^|FIND "REG_DWORD"') do ( set /a _offset=%%G ) ::convert to hours set /a _offset_hours=%_offset% / 60 :: Get current local time FOR /f "tokens=*" %%G IN ('time/t') DO set _time=%%G SET _hh=%_time:~0,2% SET _mm=%_time:~3,2% :: add offset to the current time set /a _hh=%_hh% + %_offset_hours% :: display result echo Local time: time/t echo. echo GMT time %_hh%:%_mm%