<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> The problem is mind. They people owning the server don't see it as a
> problem. So is there an utility to do that ? Thanks.
>
> > You're trying to cure the symptoms. A far better way would be
> > to cure the underlying cause, by getting your internal time server
> > to synchronise itself to an accurate time source.
You can run this batch file each time after your PC has been
synchronised to the incorrect central clock:
Line1 @echo off
Line2 if "%2"=="" (
Line3 echo.
Line4 echo Usage: AdjustTime Min Sec
Line5 echo.
Line6 echo where "Min" and "Sec" are positive or negative numbers.
Line7 echo.
Line8 pause
Line9 goto :eof
Line10 )
Line11
Line12 set MM=%1
Line13 set SS=%2
Line14 for /F "tokens=4-7 delims=: " %%a in ('c:\tools\now.exe') do set
H=%%a& set M=%%b& set S=%%c
Line15 set /a NewTime=%H%*3600 + %M%*60 + %S% + %MM% * 60 + %SS%
Line16
Line17 if %NewTime% GTR 86399 set day=next& goto BadTime
Line18 if %NewTime% LSS 0 set day=previous& goto BadTime
Line19 set /a HH=%NewTime% / 3600 & set /a NewTime=%NewTime% %% 3600
Line20 set /a MM=%NewTime% / 60 & set /a SS=%NewTime% %% 60
Line21 echo time %HH%:%MM%:%SS%
Line22 goto :eof
Line23
Line24 :Badtime
Line25 echo.
Line26 echo Error! The adjustment you requested would push the PC clock
Line27 echo into the %day% day. Program aborted.
Line28 echo.
Line29 pause
Notes:
- You must supply positive or negative minute and second adjustment
values, e.g. like so:
AdjustTime -3 0 (=minus 3 minutes, 0 seconds)
- You can download now.exe from here:
http://www.microsoft.com/windows2000...ting/now-o.asp
Adjust Line14 so that it points at the actual location of now.exe.
- Remove the Echo command in line 21 to activate the batch file.
- You may find that your PC keeps syncronising itself to the bad
time server. If so then you might have to turn off the Windows Time
service on your PC.