Commandline utility to adjust time relative to present time (currently set time)


Go Back   Computer Help Articles > Windows XP General
User Name
Password
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-05-2006, 03:54 AM
dingdongdingding@yahoo.com
 
Posts: n/a
Default Commandline utility to adjust time relative to present time (currently set time)

My PC time is adjusted automatically to a time server. However, the
time server is a few minutes ahead of the actual time and I have no
means to correct the timer server. And the firewall blocks me from
synch with a external timer server.

Is there any (commandline) utility that I can run at start up so that
it can adjust the time back by a few minutes and seconds (rather than
setting a actual time).

The sync to the time server is for signon purpose. But I think a few
minutes would affect the signon.

Thanks.

Reply With Quote
  #2  
Old 01-05-2006, 03:54 AM
Pegasus \(MVP\)
 
Posts: n/a
Default Re: Commandline utility to adjust time relative to present time (currently set time)


<dingdongdingding@yahoo.com> wrote in message
news:1136431062.719909.78000@o13g2000cwo.googlegro ups.com...
> My PC time is adjusted automatically to a time server. However, the
> time server is a few minutes ahead of the actual time and I have no
> means to correct the timer server. And the firewall blocks me from
> synch with a external timer server.
>
> Is there any (commandline) utility that I can run at start up so that
> it can adjust the time back by a few minutes and seconds (rather than
> setting a actual time).
>
> The sync to the time server is for signon purpose. But I think a few
> minutes would affect the signon.
>
> 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.


Reply With Quote
  #3  
Old 01-05-2006, 05:01 AM
dingdongdingding@yahoo.com
 
Posts: n/a
Default Re: Commandline utility to adjust time relative to present time (currently set time)

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.


Reply With Quote
  #4  
Old 01-05-2006, 05:38 AM
Lanwench [MVP - Exchange]
 
Posts: n/a
Default Re: Commandline utility to adjust time relative to present time (currently set time)



In news:1136433455.096511.93660@z14g2000cwz.googlegro ups.com,
dingdongdingding@yahoo.com <dingdongdingding@yahoo.com> typed:
> 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.


If your computer's clock is more than 5 minutes out of sync with the
server's clock, you will have a boatload of problems trying to log in and
actually use your computer. Pegasus is right; you should get them to fix
their ___.


Reply With Quote
  #5  
Old 01-05-2006, 03:49 PM
dingdongdingding@yahoo.com
 
Posts: n/a
Default Re: Commandline utility to adjust time relative to present time (currently set time)

I've manually set it before and it's working.

Anyway... is there such a utility that can set the time relative to the
current time in min or secs ? Thanks.

> If your computer's clock is more than 5 minutes out of sync with the
> server's clock, you will have a boatload of problems trying to log in and
> actually use your computer. Pegasus is right; you should get them to fix
> their ___.


Reply With Quote
  #6  
Old 01-05-2006, 03:49 PM
Pegasus \(MVP\)
 
Posts: n/a
Default Re: Commandline utility to adjust time relative to present time (currently set time)


<dingdongdingding@yahoo.com> wrote in message
news:1136433455.096511.93660@z14g2000cwz.googlegro ups.com...
> 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.


Reply With Quote
  #7  
Old 01-05-2006, 03:49 PM
Unk
 
Posts: n/a
Default Re: Commandline utility to adjust time relative to present time (currently set time)

On 4 Jan 2006 21:53:52 -0800, dingdongdingding@yahoo.com wrote:

>I've manually set it before and it's working.
>
>Anyway... is there such a utility that can set the time relative to the
>current time in min or secs ? Thanks.
>
>> If your computer's clock is more than 5 minutes out of sync with the
>> server's clock, you will have a boatload of problems trying to log in and
>> actually use your computer. Pegasus is right; you should get them to fix
>> their ___.


You could set the Windows time server to use "tick.usno.navy.mil" or a third party time setter.
It can be set to automate the time update process. http://www.atomtime.com

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Delay opening folders caused by dcom server process launcher service None Windows XP Help and Support 5 01-05-2006 02:46 AM
Windows error message Glo Windows XP Basics 41 01-05-2006 02:04 AM


All times are GMT. The time now is 08:53 PM.


Powered by vBulletin Version 3.5.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd. SEO by vBSEO 2.3.2 © 2005, Crawlability, Inc.

Commandline utility to adjust time relative to present time (currently set time)