I have scripted DateTime.bat to retrieve the current 4 digit year, 2 digit month, 2 digit day, 2 digit hour, 2 digit minute, 2 digit second, signed offset from GMT, and a 1 digit DST flag.

The syntax for using DateTime.bat is :

DateTime YYYY MM DD HH MN SS oGMT DST

Where:

YYYY is a call directed environment variable that will contain the 4 digit year.

MM   is a call directed environment variable that will contain the 2 digit month.

DD   is a call directed environment variable that will contain the 2 digit day.

HH   is a call directed environment variable that will contain the 2 digit hour.

MN   is a call directed environment variable that will contain the 2 digit minute.

SS   is a call directed environment variable that will contain the 2 digit second.

oGMT is a call directed environment variable that will contain the signed offset from GMT.

DST  is a call directed environment variable that will contain:
     a T if Daylight Savings Time is in effect.
     a F if Daylight Savings Time is NOT in effect.
DateTime.bat contains:
@echo off
if \{%8\}==\{\} @echo Syntax: DateTime YYYY MM DD HH MN SS OGMT DST
if exist "%TEMP%\DateTime.VBS" goto getit
@echo.strComputer = ".">"%TEMP%\DateTime.VBS"
@echo.Set objWMIService = GetObject("winmgmts:" ^& "\{impersonationLevel=impersonate\}!\\" ^& strComputer ^& "\root\cimv2") >>"%TEMP%\DateTime.VBS"
@echo.Set stuff = objWMIService.ExecQuery("Select * from Win32_LocalTime") >>"%TEMP%\DateTime.VBS"
@echo.For Each objItem in stuff>>"%TEMP%\DateTime.VBS"
@echo. If len(objItem.Year) = 4 Then >>"%TEMP%\DateTime.VBS"
@echo.   YYYY = objItem.Year >>"%TEMP%\DateTime.VBS"
@echo. Else>>"%TEMP%\DateTime.VBS"
@echo.   YYYY = "20" ^& objItem.Year >>"%TEMP%\DateTime.VBS"
@echo. End If>>"%TEMP%\DateTime.VBS"
@echo. If len(objItem.Month) = 2 Then >>"%TEMP%\DateTime.VBS"
@echo.   MM = objItem.Month >>"%TEMP%\DateTime.VBS"
@echo. Else>>"%TEMP%\DateTime.VBS"
@echo.   MM = "0" ^& objItem.Month >>"%TEMP%\DateTime.VBS"
@echo. End If>>"%TEMP%\DateTime.VBS"
@echo. If len(objItem.Day) = 2 Then >>"%TEMP%\DateTime.VBS"
@echo.   DD = objItem.Day >>"%TEMP%\DateTime.VBS"
@echo. Else>>"%TEMP%\DateTime.VBS"
@echo.   DD = "0" ^& objItem.Day >>"%TEMP%\DateTime.VBS"
@echo. End If>>"%TEMP%\DateTime.VBS"
@echo. If len(objItem.Hour) = 2 Then>>"%TEMP%\DateTime.VBS"
@echo.   HH = objItem.Hour >>"%TEMP%\DateTime.VBS"
@echo. Else>>"%TEMP%\DateTime.VBS"
@echo.   HH = "0" ^& objItem.Hour >>"%TEMP%\DateTime.VBS"
@echo. End If>>"%TEMP%\DateTime.VBS"
@echo. If len(objItem.Minute) = 2 Then>>"%TEMP%\DateTime.VBS"
@echo.   MN = objItem.Minute >>"%TEMP%\DateTime.VBS"
@echo. Else>>"%TEMP%\DateTime.VBS"
@echo.   MN = "0" ^& objItem.Minute >>"%TEMP%\DateTime.VBS"
@echo. End If>>"%TEMP%\DateTime.VBS"
@echo. If len(objItem.Second) = 2 Then>>"%TEMP%\DateTime.VBS"
@echo.   SS = objItem.Second >>"%TEMP%\DateTime.VBS"
@echo. Else>>"%TEMP%\DateTime.VBS"
@echo.   SS = "0" ^& objItem.Second >>"%TEMP%\DateTime.VBS"
@echo. End If>>"%TEMP%\DateTime.VBS"
@echo.Next>>"%TEMP%\DateTime.VBS"
@echo.Set stuff = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem") >>"%TEMP%\DateTime.VBS"
@echo.For Each objItem In stuff>>"%TEMP%\DateTime.VBS"
@echo.   oGMT = (objItem.CurrentTimeZone / 60) >>"%TEMP%\DateTime.VBS"
@echo.   DST = objItem.DaylightInEffect >>"%TEMP%\DateTime.VBS"
@echo.   DST = mid(DST, 1, 1) >>"%TEMP%\DateTime.VBS"
@echo.Next>>"%TEMP%\DateTime.VBS"
@echo.Wscript.Echo YYYY ^& " " ^& MM ^& " " ^& DD ^& " " ^& HH ^& " " ^& MN ^& " " ^& SS ^& " " ^& oGMT ^& " " ^& DST>>"%TEMP%\DateTime.VBS"
:getit
for /f "Tokens=1-8" %%a in ('cscript //nologo "%TEMP%\DateTime.VBS"') do (
 set %1=%%a
 set %2=%%b
 set %3=%%c
 set %4=%%d
 set %5=%%e
 set %6=%%f
 set %7=%%g
 set %8=%%h
)