How to? time /s

Oct 18, 2008
268
1
#1
Hello --

I am getting a error or a time out with the internal command

time /s

I am running tcmd 13.04 (32 bit version) on w7 64 bit --

The error is 0x522

Does anyone know what this means?
 
Jun 2, 2008
284
1
Newton, MA
#2
I have the same problem running the 64-bit version of TCC/TCMD on 64-bit Windows 7. I've had the problem for a long time but never reported it (I thought it was something wrong with my choice of time server). But just a couple of days ago, I tried various time servers, and I always got the same error.
 
#3
0x522: A required privilege is not held by the client.

As expected on Win7 ... even as administrator under UAC. And if you use SecPol.msc to give **EVERYONE** the SE_SYSTEMTIME_NAME privilege, admins under UAC still can't do it (whilie others can!). I made a big stink about this in an MS forum, not accepting the proposed "it's impossible to customize the restricted token given to admins under UAC". Dumb! Dumb! Dumb!

So if you're not an admin, you can (as admin) give yourself the privilege with SecPol.msc
 
Oct 18, 2008
268
1
#4
0x522: A required privilege is not held by the client.

As expected on Win7 ... even as administrator under UAC. And if you use SecPol.msc to give **EVERYONE** the SE_SYSTEMTIME_NAME privilege, admins under UAC still can't do it (whilie others can!). I made a big stink about this in an MS forum, not accepting the proposed "it's impossible to customize the restricted token given to admins under UAC". Dumb! Dumb! Dumb!

So if you're not an admin, you can (as admin) give yourself the privilege with SecPol.msc
Hello -- thanks for the info -- what is weird about this is that I get the 522 using tcc, but tccle (x64) it works OK -- go figure
 
#5
Hello -- thanks for the info -- what is weird about this is that I get the 522 using tcc, but tccle (x64) it works OK -- go figure
As the same user? I would not expect that. By default, only elevated processes can SetSystemTime(). As I said, you can give the privilege to whomever you want with the Security Policy editor ... that works except for unelevated admins (security policy is not applied to the unelevated admin security token). As I said, I think that's really dumb (not being able to customize the unelevated admin token) and will forever look for a way to do it (so any ideas would be appreciated).
 
#6
I just tried it with LE v12 ... no error message, but it doesn't really set the time either.

Code:
g:\tc12le> time /s time-a.nist.gov 00:00:00 AM
System time updated to : Fri  Apr 20, 2012  22:44:45
g:\tc12le> time /t
22:44:50
 
#7
Seems you need a separate process running elevated to periodically synchronize your system clock. I suppose it could be an instance of TCC.

Under XP I use automachron, but its developer has disappeared from the 'net. Another that went missing is Dale Nurden of TClockEx.
 
May 29, 2008
529
3
Groton, CT
#8
I use TClockEx under Win XP. The absence of the developer hasn't affected the useability of the application (though I presume that sooner or later, the database will get out of date).
 
#11
I could not make TClockEx run under Vista as administrator; maybe I did not start it elevated. Good to know it does work under Win7. Windows' Internet Time Server is once daily and does not log adjustment; my clock is a bit erratic so I need more frequent synchronizing and want an adjustment log which automachron provides.
 
#12
I could not make TClockEx run under Vista as administrator; maybe I did not start it elevated. Good to know it does work under Win7. Windows' Internet Time Server is once daily and does not log adjustment; my clock is a bit erratic so I need more frequent synchronizing and want an adjustment log which automachron provides.
(Replying to David, too). Whoa! Does TclockEx have a time sync'er? ... not mine, v1.4.2.

Anyway, I have **never** seen the Windows W32Time service do anything close to good (going back to its inception). I tried it again recently when I reinstalled Win7 and a day later, it was still horsing around and my clock was off a couple of minutes. For years I used my own W32tm.dll, a replacement for W32Time.dll (which the Windows service loads). But it (the service part of it) didn't work correctly under Win7. So I made a very similar DLL and coaxed my mail server (run as a service) to load it. It's working quite nicely on Win7. It sets the clock once a day and throughout the day toggles the Windows time adjustment appropriately ... keeping the clock almost always within .05 sec. (typically less) of correct. It also learns and adjusts itself (the change of ambient temperature than comes with the change of seasons, for example, accounts for a change in the clock of more than 1.2 sec/day). Here are it's current operating parameters and the tail of its log:

Code:
v:\> w32tmparams.btm
Default Clock Rate:     156001
High Clock Rate:        156004
High Rate Weight:       118     (/1000)
Low Clock Rate:         156003
Low Rate Weight:        882     (/1000)
Current Correction:     +1.173  sec/day
Weight Adjust Delta:    54      (0.030 sec/day)
WeightAdjustThreshold:  300000  (0.030 sec/day)
2012-04-19 Thu 03:17:01 Correction: -0.013 s  RTT:  63 ms
2012-04-20 Fri 03:17:01 Correction: -0.001 s  RTT:  64 ms
2012-04-21 Sat 03:17:01 Correction: +0.019 s  RTT:  60 ms