# OPC UA Server - Read/write wrong datetime

**URL:** <https://forum.inductiveautomation.com/t/opc-ua-server-read-write-wrong-datetime/38315>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [September 2, 2020, 5:05pm UTC](https://forum.inductiveautomation.com/t/opc-ua-server-read-write-wrong-datetime/38315 "2020-09-02T17:05:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![butagabriele](https://avatars.discourse-cdn.com/v4/letter/b/c77e96/32.png) [@butagabriele](https://forum.inductiveautomation.com/u/butagabriele)\
**Post date:** [September 2, 2020, 5:05pm UTC](https://forum.inductiveautomation.com/t/opc-ua-server-read-write-wrong-datetime/38315/1 "2020-09-02T17:05:35Z")

</div>

Hi,  
I’m using Ignition 7.9.14 to try to read and write some tags from a PLC SIEMENS Simotion using the opc ua connection. I’ve configured everything in ignition gateway and I can correctly read/write all available data except for datetime types.  
It seems that opc server reads a datetime shifted by two hours. I’ve already tried to change the type of the tag in ignition but I have always the same data.  
I’ve also tried to use an external opc client (Ua Expert) and with the same configuration when i tried to read the tag with the datetime, the opc client reads correctly.  
I’ve already checked the timezone and datetime of the gateway and of the pc and both are correct.

For example, as you can see in the screenshots, the external opc client reads ‘2020-08-06 8:38:23.000’ , instead ignition reads ‘2020-08-06 10:38:23.000’ ![Screenshot_4](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/c/0cc763bd02f003a355b3d1ac0b81db41718d3975.jpeg)

 ![Screenshot_3](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/3/a360c7266a6bf74f96a9c2417481378166d7c1e9.jpeg) ![Screenshot_1](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/4/e409e075289a9de9d2091c37eb63019b5c50a3b1.jpeg)

Could you please help me to solve this problem?  
Thanks.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [September 2, 2020, 5:06pm UTC](https://forum.inductiveautomation.com/t/opc-ua-server-read-write-wrong-datetime/38315/2 "2020-09-02T17:06:55Z")

</div>

Ignition is displaying the time in your local timezone, UaExpert is displaying it in UTC (that ‘Z’ at the end is for ‘Zulu’).

There is no room for date/time translation errors in OPC UA. All date/time values are transmitted in UTC, so if something is amiss then either the PLC is sending the wrong value or your timezone settings on the gateway aren’t right for some reason.

Based on the “Timestamp” value, you appear to be in CEST timezone, which is UTC+2, so the time you see in “Value” is the same as the “Value” you’re seeing in UaExpert.

---

<div class="post-metadata">

**Author:** ![Gayathri](https://avatars.discourse-cdn.com/v4/letter/g/838e76/32.png) [@Gayathri](https://forum.inductiveautomation.com/u/Gayathri)\
**Post date:** [September 27, 2022, 7:27am UTC](https://forum.inductiveautomation.com/t/opc-ua-server-read-write-wrong-datetime/38315/3 "2022-09-27T07:27:57Z")

</div>

Hi,

Recently i have encountered the same issue. Ignition version is 8.1.17

In PLC(S7-1515):

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/7/a7a6941e3285bfd5900f6bbf7dcd70dc3fcd35c0.png)

In OPC Quick Client:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/9/c92fa94e6700bafa76ec76c830ad46520026b6b3.png)

Gateway Timezone:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/3/83636e70e2d859973cc78f33178fc49f3741e812.png)

PLC Timezone:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/1/a1db2d5b566efb4e45c43c401a21d038514117de.png)

Could you please help me out where it’s going wrong.

Thanks In Advance

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [September 27, 2022, 12:17pm UTC](https://forum.inductiveautomation.com/t/opc-ua-server-read-write-wrong-datetime/38315/4 "2022-09-27T12:17:00Z")

</div>

If setting the timezone was done recently on either of these I’d try restarting (restart Ignition server, download and recompile the PLC program).

If that doesn’t work still, get a Wireshark capture and we’ll see what the raw value the server is sending is.

Something seems strange to me, though, because your Gateway Timezone is supposedly UTC+1 but the timestamp from the Quick Client displays CEST, which is UTC+2. Could be that you need the gateway server restart.

---

<div class="post-metadata">

**Author:** ![Gayathri](https://avatars.discourse-cdn.com/v4/letter/g/838e76/32.png) [@Gayathri](https://forum.inductiveautomation.com/u/Gayathri)\
**Post date:** [September 28, 2022, 5:01am UTC](https://forum.inductiveautomation.com/t/opc-ua-server-read-write-wrong-datetime/38315/5 "2022-09-28T05:01:27Z")

</div>

For now we have adjusted the PLC time as a temporary fix and meanwhile we are trying for NTP Synch. I will do restart when we are taking trails with NTP. Thank you for your support

---

<div class="post-metadata">

**Author:** ![Pablo\_Lopez](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@Pablo\_Lopez](https://forum.inductiveautomation.com/u/Pablo_Lopez)\
**Post date:** [March 20, 2023, 2:22pm UTC](https://forum.inductiveautomation.com/t/opc-ua-server-read-write-wrong-datetime/38315/6 "2023-03-20T14:22:27Z")

</div>

Hello friend, could you solve it? I have the same error of dates, if someone can help me thanks.
