Working From Home and Getting Time Drift? Fix Using w32tm.

Reading Time: 4 minutes

Share:

We’re years out now from the pandemic onset. What work looks like has changed forever. There is a good chance you aren’t in your company’s office right now, but instead you are in your working from home location. Cloud services allow you access to your email, data, and applications. You might not even need to VPN into your company’s office any longer.

There introduces the problem I encountered today. I found my laptop’s clock off by about 45 seconds. Typically, an Active Directory domain joined computer will be set to use the domain controllers for time lookup and sync. But what happens when that domain joined computer doesn’t see the domain controllers for an extended time because the remote laptop isn’t VPNing into the office? Time drift.

Checking Remote Computer Clock

Windows 11 no longer shows you the seconds when clicking on the clock in the system tray. Instead, a quick way to see the current precise time of your computer would be from a Command Prompt or PowerShell window using w32tm. The following allows you to compare the time on the local system to a target system (either local or public).

In this example, to compare the time on your machine to 0.us.pool.ntp.org you would type this from a Command Prompt or PowerShell window:

w32tm /stripchart /computer:0.us.pool.ntp.org

w32tm /stripchart /computer:0.us.pool.ntp.org

That command compares the local time to 0.us.pool.ntp.org every 2 seconds in perpetuity. You can press Ctrl + C to stop it from continuing. You can see the current time when the command was run along with every 2 seconds a new row will show the offset of time between the target computer and your local computer. This is shown in the value after o: to see if your machine is running fast, slow, or right on time. In the screenshot example, the local machine is right on time showing 0.15 to 0.17 seconds slow (as the target computer is +0.15 to +0.17 faster as indicated by the plus sign).

Here is an example from a machine I purposely set fast:

machine purposely set fast

You can see that the target computer time is 25 seconds slower than the local computer as indicated by -25.0069614s after the o:.

Here is an example from a machine I purposely set slow:

computer purposely set slow

You can see that the target computer time is 7 seconds faster than the local computer as indicated by +07.7032186s after the o:.

In these three examples take a note of where the asterisk position is. In the first screen shot it was in the center indicating that the target computer was neither faster nor slower than the local computer. In the second example it was on the left side indicating that the target computer was slower than the local computer. In this example, the asterisk is on the right, indicating that the target computer is faster than the local computer.

How to Fix Time Drift

So how would you resolve this? Set the local computer to poll an external time source.

To make the change run the following 3 commands from an elevated PowerShell:

w32tm /config /manualpeerlist:”0.us.pool.ntp.org 1.us.pool.ntp.org 2.us.pool.ntp.org 3.us.pool.ntp.org” /syncfromflags:manual /reliable:YES /update

w32tm /config /update

restart-service w32time

fixing time drift when working from home

You’ve just changed your machine to use 4 different reliable time sources. Confirm it took by running:

w32tm /query /peers

how to fix time drift when working from home

If your time was off previously it may take a few minutes for it to become synchronized again. You can watch the status by running the same command as before from a Command Prompt or PowerShell window:

w32tm /stripchart /computer:0.us.pool.ntp.org

The asterisk will slowly come to the center of the screen. Anything with less than a second offset is reasonably good.

Have any questions about how to fix time drift when working from home? Feel free to contact our experts at any time!

This publication contains general information only and Sikich is not, by means of this publication, rendering accounting, business, financial, investment, legal, tax, or any other professional advice or services. This publication is not a substitute for such professional advice or services, nor should you use it as a basis for any decision, action or omission that may affect you or your business. Before making any decision, taking any action or omitting an action that may affect you or your business, you should consult a qualified professional advisor. In addition, this publication may contain certain content generated by an artificial intelligence (AI) language model. You acknowledge that Sikich shall not be responsible for any loss sustained by you or any person who relies on this publication.

SIGN-UP FOR INSIGHTS

Join 14,000+ business executives and decision makers

Upcoming Events

Upcoming Events

Latest Insights

About The Author