1 person found this helpful
If you have Perl installed this one helps
perl -e "print time();"
Sure, or simply:
perl -le 'print time'
but unfortunately, perl is not often available.
Earlier today, my coworker sent over the following. It does the job.
WScript.Echo "current time= " & Now
str_epoch= "01/01/1970 12:00 AM"
strInstalldate = DateDiff("s",str_epoch,Now)
WScript.Echo "seconds since epoch= " & strInstalldate
WScript.Echo "seconds added to epoch = " & str_plus
Perhaps someone besides me will find it useful.
Years late, but maybe this will help someone else out, from PowerShell:
[math]::Round(((get-date) - (get-date 1/1/1970)).TotalSeconds,0)