# Ignition MySQL timestamp / datetime mismatch

**URL:** <https://forum.inductiveautomation.com/t/ignition-mysql-timestamp-datetime-mismatch/101682>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [January 31, 2025, 4:34pm UTC](https://forum.inductiveautomation.com/t/ignition-mysql-timestamp-datetime-mismatch/101682 "2025-01-31T16:34:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![E.E.T](https://avatars.discourse-cdn.com/v4/letter/e/b19c9b/32.png) [@E.E.T](https://forum.inductiveautomation.com/u/E.E.T)\
**Post date:** [January 31, 2025, 4:34pm UTC](https://forum.inductiveautomation.com/t/ignition-mysql-timestamp-datetime-mismatch/101682/1 "2025-01-31T16:34:43Z")

</div>

It appears that the timestamp I insert and the one I retrieve to and from a MySQL differs (retrieved timestamp is 1 hour after the inserted one). Ignition is running on a docker container created from the original image and mysqlis in another container also from the official image. I'm using zxdbc libs instead of the db modules in ignition but I've set the timezones to Europe/Rome on both containers and on every Ignition setting possible, including Ignition.conf java additional parameters. What is causing the issue? Setting the jdbc connection url parameters to connectionTimeZone=Europe/Rome doesn't seem to help either

---

<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:** [January 31, 2025, 4:39pm UTC](https://forum.inductiveautomation.com/t/ignition-mysql-timestamp-datetime-mismatch/101682/2 "2025-01-31T16:39:11Z")

</div>

> [@E.E.T](#):
>
> I'm using zxdbc libs instead of the db modules in ignition

I don't see how you can expect to be supported when doing this. (If you are using Ignition Edge, you are violating the license.)

---

<div class="post-metadata">

**Author:** ![E.E.T](https://avatars.discourse-cdn.com/v4/letter/e/b19c9b/32.png) [@E.E.T](https://forum.inductiveautomation.com/u/E.E.T)\
**Post date:** [January 31, 2025, 4:40pm UTC](https://forum.inductiveautomation.com/t/ignition-mysql-timestamp-datetime-mismatch/101682/3 "2025-01-31T16:40:43Z")

</div>

I'm not, I just don't like using the integrated module for querys

---

<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:** [January 31, 2025, 4:43pm UTC](https://forum.inductiveautomation.com/t/ignition-mysql-timestamp-datetime-mismatch/101682/4 "2025-01-31T16:43:09Z")

</div>

Are you using a timezone-aware column type in the DB? (MySQL datetime columns are not, timestamp columns are, but have side effects.)

---

<div class="post-metadata">

**Author:** ![E.E.T](https://avatars.discourse-cdn.com/v4/letter/e/b19c9b/32.png) [@E.E.T](https://forum.inductiveautomation.com/u/E.E.T)\
**Post date:** [January 31, 2025, 4:45pm UTC](https://forum.inductiveautomation.com/t/ignition-mysql-timestamp-datetime-mismatch/101682/5 "2025-01-31T16:45:52Z")

</div>

It is mysql time, so using datetime instead might be the solution?

---

<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:** [January 31, 2025, 4:47pm UTC](https://forum.inductiveautomation.com/t/ignition-mysql-timestamp-datetime-mismatch/101682/6 "2025-01-31T16:47:39Z")

</div>

No, timestamp is the column type that usually behaves correctly. But definitely examine all of your time zone expectations on both systems.

---

<div class="post-metadata">

**Author:** ![E.E.T](https://avatars.discourse-cdn.com/v4/letter/e/b19c9b/32.png) [@E.E.T](https://forum.inductiveautomation.com/u/E.E.T)\
**Post date:** [January 31, 2025, 4:50pm UTC](https://forum.inductiveautomation.com/t/ignition-mysql-timestamp-datetime-mismatch/101682/7 "2025-01-31T16:50:53Z")

</div>

okay I was actually using mysql "time", and even changing to timestamp or datetime has no effect, that's kind of confusing
