in reply to Re^2: last update time of hardware clock (Windows and Linux)
in thread last update time of hardware clock (Windows and Linux) with the Server

I am looking for the last time it was synchronized with a time from the server.

On windows, you can parse the output of: w32tm /query /status. It is the 7th line of 9.

The info is probably in the registry somewhere, but a quick search of ms.com didn't turn up the relevant key.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^4: last update time of hardware clock (Windows and Linux)
by thanos1983 (Parson) on Sep 22, 2014 at 10:57 UTC

    Hello BrowserUk,

    Thank you for your time and effort, I will try to find a common solution that can be applied in both OS. Alternatively I will create a different process for Windows and Linux.

    I appreciate your time and effort. Thanks again.

    Seeking for Perl wisdom...on the process of learning...not there...yet!
      I will try to find a common solution that can be applied in both OS.

      It's very doubtful that you'll succeed in that.

      From a very cursory look, I'm not sure that *nix retains last NTP update info; but if it does you won't find a single method that will obtain that information on both *nix and Windows. They are just too different.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

        Hello BrowserUk,

        I am also afraid that this might not be possible (a common solution for both OS). Well I suppose I have to move forward from this point, until the next one.

        Again thank you for your time and effort.

        Seeking for Perl wisdom...on the process of learning...not there...yet!