# Daylight Savings Time (DST)

**URL:** <https://forum.inductiveautomation.com/t/daylight-savings-time-dst/103446>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 10, 2025, 12:22pm UTC](https://forum.inductiveautomation.com/t/daylight-savings-time-dst/103446 "2025-03-10T12:22:49Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![AUSDIV](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@AUSDIV](https://forum.inductiveautomation.com/u/AUSDIV)\
**Post date:** [March 10, 2025, 12:22pm UTC](https://forum.inductiveautomation.com/t/daylight-savings-time-dst/103446/1 "2025-03-10T12:22:49Z")

</div>

My Gateway shows the proper time, but the tag historian is still logging an hour back. I rebooted the gateway, and the problem did not go away. The gateway shows the proper time, the local computer running the gateway shows the proper time (I assume that is where the gateway is pulling it from anyhow), the PLC's generating the tags show the proper time, though I assume that is irrelevant anyhow.

I am sure I am missing something. Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [March 10, 2025, 12:26pm UTC](https://forum.inductiveautomation.com/t/daylight-savings-time-dst/103446/2 "2025-03-10T12:26:15Z")

</div>

What is the time on the server where the Historian Database is located?

---

<div class="post-metadata">

**Author:** ![AUSDIV](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@AUSDIV](https://forum.inductiveautomation.com/u/AUSDIV)\
**Post date:** [March 10, 2025, 12:27pm UTC](https://forum.inductiveautomation.com/t/daylight-savings-time-dst/103446/3 "2025-03-10T12:27:49Z")

</div>

It is all on the same local PC, sorry. So, Databases are local, Gateway is local.

---

<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:** [March 10, 2025, 12:33pm UTC](https://forum.inductiveautomation.com/t/daylight-savings-time-dst/103446/4 "2025-03-10T12:33:29Z")

</div>

Are your PLCs connected via Ignition native drivers, or via OPC UA connections? If the latter, they **do** get their timestamps from the PLC.

---

<div class="post-metadata">

**Author:** ![AUSDIV](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@AUSDIV](https://forum.inductiveautomation.com/u/AUSDIV)\
**Post date:** [March 10, 2025, 12:35pm UTC](https://forum.inductiveautomation.com/t/daylight-savings-time-dst/103446/5 "2025-03-10T12:35:48Z")

</div>

They are linked under OPC UA Device Connections, but the PLC time is also correct. It was off, I adjusted it, then I verified gateway was proper time stamp, then rebooted the gateway.

---

<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:** [March 10, 2025, 12:38pm UTC](https://forum.inductiveautomation.com/t/daylight-savings-time-dst/103446/6 "2025-03-10T12:38:58Z")

</div>

Is the PLC's timezone/DST status correct? It could still be giving you a hour offset in UTC, which is how OPC transfers all timestamps. (As does Ignition, internally.)

(U.S. time changed this weekend, so your problem is suspicious.)

---

<div class="post-metadata">

**Author:** ![AUSDIV](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@AUSDIV](https://forum.inductiveautomation.com/u/AUSDIV)\
**Post date:** [March 10, 2025, 12:42pm UTC](https://forum.inductiveautomation.com/t/daylight-savings-time-dst/103446/7 "2025-03-10T12:42:14Z")

</div>

Yes, it is using UTC -5 (Eastern time zone) and then has Adjust for DST checked to do the +1.

Technically, I am determining my dateandtime is wrong because I did the following:

```python
 SELECT CAST(DATEADD(SECOND, (t_stamp/1000) - 18000
 ,'1970/1/1') AS DateTime)

```

I suppose I am assuming that -18000 should still be correct before/after DST because the gateway adjusted its time automatically, but I am thinking I am wrong.

---

<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:** [March 10, 2025, 12:44pm UTC](https://forum.inductiveautomation.com/t/daylight-savings-time-dst/103446/8 "2025-03-10T12:44:16Z")

</div>

MS SQL Server? Its datetime columns don't carry time zone information. If you are using those in a timezone-aware application, you've screwed up. (IMNSHO, if you are using MS SQL Server at all, you've screwed up. But this particular case is an extra screw up.)

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [March 10, 2025, 12:46pm UTC](https://forum.inductiveautomation.com/t/daylight-savings-time-dst/103446/9 "2025-03-10T12:46:23Z")

</div>

What happens if you retrieve the data from the historian using the `system.tag.*` functions (as you should be anyway), and then convert the t-stamp using `system.date.fromMillis()` function.

---

<div class="post-metadata">

**Author:** ![AUSDIV](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@AUSDIV](https://forum.inductiveautomation.com/u/AUSDIV)\
**Post date:** [March 10, 2025, 12:51pm UTC](https://forum.inductiveautomation.com/t/daylight-savings-time-dst/103446/10 "2025-03-10T12:51:17Z")

</div>

This does appear to be the case, but this would be my first DST crossing since getting my feet wet in this stuff, so as long as learning occurs, I suppose extra-screw ups can be good long term... lol.

---

<div class="post-metadata">

**Author:** ![mdemaris](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mdemaris/32/54639_2.png) [@mdemaris](https://forum.inductiveautomation.com/u/mdemaris)\
**Post date:** [June 24, 2026, 5:34pm UTC](https://forum.inductiveautomation.com/t/daylight-savings-time-dst/103446/11 "2026-06-24T17:34:59Z")

</div>

Don't listen to this! MSSQL is good! SQL Server does have time zone functionality, not sure when it was added, but you can find it in the MS docs. I am storing all my time stamps `SYSUTCDATETIME()`, but for some scripting I need to find a way to automatically adjust for the daylight savings time offset.

---

<div class="post-metadata">

**Author:** ![David\_Stone](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/david_stone/32/79749_2.png) [@David\_Stone](https://forum.inductiveautomation.com/u/David_Stone)\
**Post date:** [June 24, 2026, 9:20pm UTC](https://forum.inductiveautomation.com/t/daylight-savings-time-dst/103446/12 "2026-06-24T21:20:20Z")

</div>

> [@mdemaris](#):
>
> MSSQL is good!

Haha, nice try Copilot...
