PC Review


Reply
Thread Tools Rate Thread

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

 
 
dingdongdingding@yahoo.com
Guest
Posts: n/a
 
      5th Jan 2006
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
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      5th Jan 2006

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
 
dingdongdingding@yahoo.com
Guest
Posts: n/a
 
      5th Jan 2006
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
 
Lanwench [MVP - Exchange]
Guest
Posts: n/a
 
      5th Jan 2006


In news:(E-Mail Removed),
(E-Mail Removed) <(E-Mail Removed)> 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
 
dingdongdingding@yahoo.com
Guest
Posts: n/a
 
      5th Jan 2006
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
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      5th Jan 2006

<(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.


 
Reply With Quote
 
Unk
Guest
Posts: n/a
 
      5th Jan 2006
On 4 Jan 2006 21:53:52 -0800, (E-Mail Removed) 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
 
dingdongdingding@yahoo.com
Guest
Posts: n/a
 
      9th Jan 2006
I think the difference between the time server and actual is exceeding
5 min soon. I've escalated the problem to help desk next level. I hope
they would fix the problem soon.

If not, I'll use the script is it's still less than 5 min. They warn
me again that I won't be able to signon if I change my time by too
much.

Thanks for all the help. Cheers.

 
Reply With Quote
 
dingdongdingding@yahoo.com
Guest
Posts: n/a
 
      18th Jan 2006
Just to update you. No success from help desk. So I tried the script.

It worked..... but the system adjust itself back to the 'wrong' time at
intervals.

So too bad.

Thanks for the help !

 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      18th Jan 2006

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Just to update you. No success from help desk. So I tried the script.
>
> It worked..... but the system adjust itself back to the 'wrong' time at
> intervals.
>
> So too bad.
>
> Thanks for the help !
>


I warned you about this and I gave you the recipe to prevent it from
happening.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adjust Date if Start time -> Stop time is overnight Renraf Microsoft Access Form Coding 6 23rd Sep 2009 06:49 PM
Re: Adjust Time To Authoritatitve Time Server Richard G. Harper Windows Vista General Discussion 0 21st Aug 2008 10:44 AM
Re: Adjust Time To Authoritatitve Time Server Synapse Syndrome Windows Vista General Discussion 0 21st Aug 2008 09:21 AM
Difference between Windows Time Service and Internet Time in Date & Time Properties Saucer Man Windows XP General 0 14th Feb 2008 01:51 PM
Run Time Error 2486 - Can't Carry out this action at the present time jfranke Microsoft Access Reports 0 14th Apr 2007 02:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:06 PM.