Grabbing date from Gateway instead of Design PC

Just having some trouble capturing a date. I’m trying to get a label to read a start time when a PLC tag turns true. I’ve got it working, but because it’s pulling time from the designer it matches my computer date whenever I log on. This is a process that needs to be tracked to the exact time, so it’s unacceptable to risk the dates changing just because I’m online. I’ve only been working in Ignition for the past 8-10 months so I’m still learning my way around. This is what I’ve got now in a text expression. I’ve viewed the system.date.now manual page, but nothing that seems to be applicable to an expression.

if({[AgeOven4]Load Cycle Bits/Oven Cycle Start},
dateFormat(now(0), "MMM d, h:mm a"),
"NO START DATE AVAILABLE")

Use a gateway tag change event, that will keep the execution on the gateway and use the gateway clock. Monitor the oven tag, and write the current datetime to a memory tag when the tag transitions from low to high. Display the memory tag value via the label.

Considering this, it would be a better idea to log the timestamp to a db table when the PLC tag changes. If you log both the timestamp and the tag value whenever it changes, you can use lead/lag functions in the DB to get the total time the oven was on over a period of time or for each cycle.

Also keep in mind that dates in Ignition are objects that are naturally UTC-based, and transferred as binary objects, but are displayed in the local timezone of whatever JVM stringifies them.

Given a gateway timestamp object, that you then transfer to the designer or to a Vision client, they will render that UTC point in time in the local JVM timezone.

Perspective can render in the browser timezone too, but only in components that natively understand datetime transfers.