[ntp:questions] ntpq -crv gives results in local time, not UTC

Dave Hart hart at ntp.org
Thu Apr 5 16:16:08 UTC 2012


On Thu, Apr 5, 2012 at 06:05, David J Taylor
<david-taylor at blueyonder.co.uk.invalid> wrote:
> It seems that, on Windows at least, ntpq -crv gives results in local time,
> and not in UTC.  Is that intended?  Is there a switch for results in UTC?

Yes, it's intentional.  There is no built-in switch to use UTC but you
can do it on most systems by setting/changing the TZ environment
variable.  On Windows:

set TZ=GMT0 & ntpq -crv & set TZ=

on Unix:

env TZ=GMT0 ntpq -crv

Of course, neither is necessary if your local timezone is UTC to begin
with.  I use UTC on my Windows systems because Windows misrepresents
historical and future timestamps which are in the other half of the
year, in DST terms.

Cheers,
Dave Hart


More information about the questions mailing list