# Discrepancy in displayed time between now() and Gateway tag

**URL:** <https://forum.inductiveautomation.com/t/discrepancy-in-displayed-time-between-now-and-gateway-tag/20941>\
**Category:** Ignition\
**Created:** [November 19, 2018, 3:18pm UTC](https://forum.inductiveautomation.com/t/discrepancy-in-displayed-time-between-now-and-gateway-tag/20941 "2018-11-19T15:18:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr\_Joshua](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@Mr\_Joshua](https://forum.inductiveautomation.com/u/Mr_Joshua)\
**Post date:** [November 19, 2018, 3:18pm UTC](https://forum.inductiveautomation.com/t/discrepancy-in-displayed-time-between-now-and-gateway-tag/20941/1 "2018-11-19T15:18:22Z")

</div>

I added some code to get our PLCs roughly on the same time as our Ignition Gateway, and I noticed that depending on which path we used, we get times that are slightly different (4 minutes off).  
Here is one method I used that gave me a later time in a numeric label:  
dateextract({[System]Gateway/CurrentDateTime}, “hour”)

The earlier time showed up when I used this for the default system CurrentTime:  
dateFormat(now(),{Root Container.Current Time.format})

The later time also showed up when I used now() for an expression tag:  
now(10)

I expect that the “now()” in the 2nd instance is looking at the client workstation, and the other two instances are looking at the Gateway’s clock, but I’m not sure.

Any thoughts here?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 19, 2018, 3:22pm UTC](https://forum.inductiveautomation.com/t/discrepancy-in-displayed-time-between-now-and-gateway-tag/20941/2 "2018-11-19T15:22:56Z")

</div>

Now() returns the time on whatever computer executes it. Insist on synchronized clocks. Consider putting an alarm banner in your nav window that displays the discrepancy when it is more than a second or two.

---

<div class="post-metadata">

**Author:** ![Mr\_Joshua](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@Mr\_Joshua](https://forum.inductiveautomation.com/u/Mr_Joshua)\
**Post date:** [November 19, 2018, 3:33pm UTC](https://forum.inductiveautomation.com/t/discrepancy-in-displayed-time-between-now-and-gateway-tag/20941/3 "2018-11-19T15:33:34Z")

</div>

So I was right: the discrepancy is between the Client & the Gateway. When running the “now” inside the tag, it was scoped to the Gateway, so they matched.

Thanks!
