I\'m writing a batch script and I need the unix time. It\'s easy under linux, but I can\'t figure out how to do this in windows.
You can use vbscript in windows, the interpreter is available on your system.
'--------------------epoch.vbs-----------------------
option explicit
dim s,o,z
for each o in GetObject("winmgmts:").InstancesOf ("Win32_OperatingSystem")
z=o.CurrentTimeZone
next
s=DateDiff("s", "01/01/1970 00:00:00", Now())-(60*z)
wscript.echo(s)
wscript.quit