Tag Write Timestamp consistently lags actual time of write by about 7 seconds

I’m writing True to a particular Boolean tag at 10:14:45 and at 10:15:00 (as shown by the CurrentDateTime tag in the System tag provider).

I would have expected the Timestamp of this Boolean tag to change to the same timestamps when I changed the tag to True but they seem to lag the CurrentDateTime timestamp by about 7 seconds consistently. First time it’s True, the Timestamp value is 10:14:38 and the second time it’s True, the Timestamp value is 10:14:53.

Is this expected behavior? Am I missing something here? Attaching a video of my tag writes with the CurrentDateTime shown on top and the Timestamp of the tag shown below.

Look for discrepancies between your clock on the designer and the clock of the gateway.

They seem to be the same.

I tried running the below in the script console:

designer_time = system.date.now()
gateway_time = system.tag.readBlocking(["[System]Gateway/CurrentDateTime"])[0].value

print "Designer time: {}".format(designer_time)
print "Gateway time:  {}".format(gateway_time)
print "Difference: {}s".format(system.date.secondsBetween(designer_time, gateway_time))

Output:

Designer time: Mon Nov 17 12:02:25 PST 2025
Gateway time:  Mon Nov 17 12:02:25 PST 2025
Difference: 0s

Although this is assuming that running system.date.now() from the Script Console gives the Designer time. Not too sure about this.

What’s interesting is that I just reset the trial mode license on my gateway and now I don’t seem to have this lag. Perhaps the lag is present with a gateway in unlicensed mode?

Going to confirm this when my trial runs out in less than 2 hours

Okay I have no lag now with my trial license expired. So that didn’t have an affect.

You running your gateway on your machine? If so (and even if not) are you getting clock drift?