home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch.nt      Fun with Windows NT batch files      68,980 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 67,662 of 68,980   
   Kerr-Mudd,John to McCormack   
   Re: System Time   
   07 Nov 20 10:32:49   
   
   From: notsaying@127.0.0.1   
      
   On Fri, 06 Nov 2020 22:27:10 GMT, gazelle@shell.xmission.com (Kenny   
   McCormack) wrote:   
      
   > In article ,   
   > Robert Roland   wrote:   
   > ...   
   >>If we simply use our own computer as a remote server, it seems to   
   >>work:   
   >>   
   >>echo Apparent time is %date% %time%   
   >>   
   >>for /F "tokens=6,7" %%n in ('NET TIME \\%computername%^|find "Current   
   >>time"') do set realdate=%%n&set realtime=%%o   
   >   
   > You can also use: net time \\127.0.0.1   
   >   
   > to save the hassle of making sure that "computername" is meaningfully   
   > set.   
   >   
      
   Sadly for me (UK, date format yyyy-mm-dd)   
   gives the date in US format:   
      
      
   C:\>net time \\127.0.0.1   
   Current time at \\127.0.0.1 is 11/7/2020 10:32 AM   
      
   The command completed successfully.   
      
      
   C:\>date   
   The current date is: 2020-11-07   
   Enter the new date: (yy-mm-dd)   
      
   --   
   Bah, and indeed, Humbug.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca