Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch    |    Fun with MS-DOS batch files    |    42,547 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 41,489 of 42,547    |
|    foxidrive to Kerr Mudd-John    |
|    Re: date format & time questions    |
|    12 Oct 16 23:30:47    |
      From: foxidrive@server.invalid              On 12/10/2016 19:47, Kerr Mudd-John wrote:              > I forsee problems with that hardcoded century in there!              We will get to the Y2K1 bug eventually! Damn! I hope my microwave still       works.                     Kidding. You'll note that wmic itself shows the correct century so a       comparison can stop it truncating that line. I had a shot at modifying it       and nulling the bogus millisecond value...                     ::GetTimeUTC-modded.cmd :::::::::::::::::::::::::::::::::::::::::::::       @Echo off &SetLocal EnableDelayedExpansion       for /f "Tokens=1,2 Delims==" %%A in (        'wmic path win32_utctime get /format:list ^|findstr "="'       ) do set B=%%B&set "_%%A=!B:~0,-1!"& if !_%%A! LSS 10 (set _%%A=0!_%%A!)       set "_milliseconds="       Set _UTC=%_Year%%_Month%%_Day%T%_Hour%%_Minute%%_Second%+0000       Set _       ::GetTimeUTC.cmd :::::::::::::::::::::::::::::::::::::::::::::              --- 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