windows and linux viewing time

win7 and win 2008 acquisition date formatting commands bat

 

windonws batch file differ for different operating systems format for the date of this parameter in Win7 and win server 2008 is not the same:

 

1.windows 7  

date  /t

time  /t



 2.window 2008

 

 

As this system for even a date of our acquisition process yyyymmdd format:

 


windows7:%date:~10,4%%date:~4,2%%date:~7,2%

windwo 2008 : %date:~6,4%%date:~3,2%%date:~0,2%

 

LINUX can date -s

date -s "2017-07-07 12:52:00"

date +"%Y/%m/%d %H:%M:%S"

Guess you like

Origin www.cnblogs.com/classics/p/11498892.html