1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to? time /s

Discussion in 'Support' started by fpefpe, Apr 20, 2012.

  1. fpefpe

    Joined:
    Oct 18, 2008
    Messages:
    251
    Likes Received:
    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?
     
  2. Jay Sage

    Joined:
    Jun 2, 2008
    Messages:
    284
    Likes Received:
    1
    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. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,972
    Likes Received:
    30
    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
     
  4. fpefpe

    Joined:
    Oct 18, 2008
    Messages:
    251
    Likes Received:
    1
    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. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,972
    Likes Received:
    30
    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. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,972
    Likes Received:
    30
    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. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    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.
     
  8. dcantor

    Joined:
    May 29, 2008
    Messages:
    507
    Likes Received:
    3
    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).
     
  9. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,972
    Likes Received:
    30
    I use it too (in Win7).

    What database, Dave?
     
  10. David Marcus

    Joined:
    Jun 4, 2008
    Messages:
    648
    Likes Received:
    1
    Why not let Windows set the time from the time server using the "Internet Time" tab under Control Panel > Date and Time? By the way, you can use north-america.pool.ntp.org to distribute your requests to different time servers.
     
  11. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    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. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,972
    Likes Received:
    30
    (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
     
  13. dcantor

    Joined:
    May 29, 2008
    Messages:
    507
    Likes Received:
    3
    I was confusing TClockEx with another clock application. Sorry. AFAIK, TClockEx doesn't have a database.
     
  14. David Marcus

    Joined:
    Jun 4, 2008
    Messages:
    648
    Likes Received:
    1
    I'm running Vista and my clock is less than a second different from http://www.time.gov/timezone.cgi?Eastern/d/-5/java . Wikipedia says Windows should be accurate to a couple of seconds. If your clock is a couple of minutes off, then I suspect you've got something else wrong.
     

Share This Page