# Storing and Retrieving UTC from Database

**URL:** <https://forum.inductiveautomation.com/t/storing-and-retrieving-utc-from-database/115885>\
**Category:** Ignition\
**Tags:** ignition83, database\
**Created:** [June 8, 2026, 11:28am UTC](https://forum.inductiveautomation.com/t/storing-and-retrieving-utc-from-database/115885 "2026-06-08T11:28:36Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zachary\_Kacel1](https://avatars.discourse-cdn.com/v4/letter/z/ea666f/32.png) [@Zachary\_Kacel1](https://forum.inductiveautomation.com/u/Zachary_Kacel1)\
**Post date:** [June 8, 2026, 11:28am UTC](https://forum.inductiveautomation.com/t/storing-and-retrieving-utc-from-database/115885/1 "2026-06-08T11:28:36Z")

</div>

I have a system than where the Ignition Server is setup in Eastern Time and the Database MSSQL is setup in Eastern Time. I have a project that will run where clients will be in more than one time zone.

Due to how many projects are on the Existing Ignition server and the number of systems using the database, changing the system to run in UTC is off the table, plus our DB admins have stated they won't change the servers to UTC.

What is the best way to to work in UTC when the server and the database is in Eastern?

Can I just work with the Millisecond Time and store everything as a bigInt in that database, or should I do some conversion before writing to the database so I can store it as a date in SQL.

---

<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:** [June 8, 2026, 12:03pm UTC](https://forum.inductiveautomation.com/t/storing-and-retrieving-utc-from-database/115885/2 "2026-06-08T12:03:48Z")

</div>

Use the `datetimeoffset` column type.

(Or switch to a more competent database, like PostgreSQL, and use its `timestamptz` column type.)

---

<div class="post-metadata">

**Author:** ![Zachary\_Kacel1](https://avatars.discourse-cdn.com/v4/letter/z/ea666f/32.png) [@Zachary\_Kacel1](https://forum.inductiveautomation.com/u/Zachary_Kacel1)\
**Post date:** [June 8, 2026, 12:18pm UTC](https://forum.inductiveautomation.com/t/storing-and-retrieving-utc-from-database/115885/3 "2026-06-08T12:18:39Z")

</div>

I added a datetimeoffest column type to a test table and I see this error.

> Exception: java.sql.SQLException: Unknown SQL type: -155

---

<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:** [June 8, 2026, 12:19pm UTC](https://forum.inductiveautomation.com/t/storing-and-retrieving-utc-from-database/115885/4 "2026-06-08T12:19:51Z")

</div>

Where and when do you see this error?

---

<div class="post-metadata">

**Author:** ![Zachary\_Kacel1](https://avatars.discourse-cdn.com/v4/letter/z/ea666f/32.png) [@Zachary\_Kacel1](https://forum.inductiveautomation.com/u/Zachary_Kacel1)\
**Post date:** [June 8, 2026, 12:22pm UTC](https://forum.inductiveautomation.com/t/storing-and-retrieving-utc-from-database/115885/5 "2026-06-08T12:22:26Z")

</div>

I see it on my tag Query Binding and in the Named Queries Testing

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

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

---

<div class="post-metadata">

**Author:** ![Zachary\_Kacel1](https://avatars.discourse-cdn.com/v4/letter/z/ea666f/32.png) [@Zachary\_Kacel1](https://forum.inductiveautomation.com/u/Zachary_Kacel1)\
**Post date:** [June 8, 2026, 12:24pm UTC](https://forum.inductiveautomation.com/t/storing-and-retrieving-utc-from-database/115885/6 "2026-06-08T12:24:38Z")

</div>

Looking at some other Form posts, I may just need to update the JDBC driver? Does that not update when updating the server? We are on the latest 8.3

---

<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:** [June 8, 2026, 12:34pm UTC](https://forum.inductiveautomation.com/t/storing-and-retrieving-utc-from-database/115885/7 "2026-06-08T12:34:10Z")

</div>

> [@Zachary\_Kacel1](#):
>
> Does that not update when updating the server?

Not in 8.1 nor from 8.1 to 8.3. JDBC drivers are now modules in v8.3, so that may change going forward.

---

<div class="post-metadata">

**Author:** ![Zachary\_Kacel1](https://avatars.discourse-cdn.com/v4/letter/z/ea666f/32.png) [@Zachary\_Kacel1](https://forum.inductiveautomation.com/u/Zachary_Kacel1)\
**Post date:** [June 8, 2026, 12:52pm UTC](https://forum.inductiveautomation.com/t/storing-and-retrieving-utc-from-database/115885/8 "2026-06-08T12:52:20Z")

</div>

My MSSQL JDBC Driver is 1.3.6. What is the latest version out?

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

---

<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:** [June 8, 2026, 12:56pm UTC](https://forum.inductiveautomation.com/t/storing-and-retrieving-utc-from-database/115885/9 "2026-06-08T12:56:16Z")

</div>

13.4

> **[Support Matrix for Microsoft JDBC Driver - JDBC Driver for SQL Server](https://learn.microsoft.com/en-us/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server-support-matrix?view=sql-server-ver17)**
>
> This page contains the support matrix and support life-cycle policy for the Microsoft JDBC Driver for SQL Server.

---

<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:** [June 8, 2026, 1:04pm UTC](https://forum.inductiveautomation.com/t/storing-and-retrieving-utc-from-database/115885/10 "2026-06-08T13:04:06Z")

</div>

> [@Zachary\_Kacel1](#):
>
> My MSSQL JDBC Driver is 1.3.6.

This is the Ignition module version.

> [@lrose](#):
>
> 13.4

This is a JDBC driver version.

I don't know if there's a good way to see the _JDBC_ version without looking at the file system / JAR file in 8.3...

---

<div class="post-metadata">

**Author:** ![dillon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dillon/32/81537_2.png) [@dillon](https://forum.inductiveautomation.com/u/dillon)\
**Post date:** [June 8, 2026, 1:12pm UTC](https://forum.inductiveautomation.com/t/storing-and-retrieving-utc-from-database/115885/11 "2026-06-08T13:12:39Z")

</div>

FWIW I have a database that uses the `datetimeoffset` column type and to have Named Queries work, I must cast it to a `datetime` column type. Otherwise, I get the same error.

_MS SQL Server Version 15.0.4470, Ignition 8.1.42 for context_

---

<div class="post-metadata">

**Author:** ![Zachary\_Kacel1](https://avatars.discourse-cdn.com/v4/letter/z/ea666f/32.png) [@Zachary\_Kacel1](https://forum.inductiveautomation.com/u/Zachary_Kacel1)\
**Post date:** [June 8, 2026, 2:52pm UTC](https://forum.inductiveautomation.com/t/storing-and-retrieving-utc-from-database/115885/12 "2026-06-08T14:52:13Z")

</div>

You lose the timezone offset data when doing this though? Right?

---

<div class="post-metadata">

**Author:** ![dillon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dillon/32/81537_2.png) [@dillon](https://forum.inductiveautomation.com/u/dillon)\
**Post date:** [June 8, 2026, 2:58pm UTC](https://forum.inductiveautomation.com/t/storing-and-retrieving-utc-from-database/115885/13 "2026-06-08T14:58:46Z")

</div>

Right, it gives you time stamp local to that offset.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 8, 2026, 4:07pm UTC](https://forum.inductiveautomation.com/t/storing-and-retrieving-utc-from-database/115885/14 "2026-06-08T16:07:14Z")

</div>

> [@Kevin.Herron](#):
>
> I don't know if there's a good way to see the _JDBC_ version without looking at the file system / JAR file in 8.3...

Good news here - in 8.3.7 there's going to be a (best effort) column on the drivers table showing the JDBC driver version.

Currently we're shipping 13.2.1 in the MSSQL JDBC module, for what it's worth.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 9, 2026, 10:00am UTC](https://forum.inductiveautomation.com/t/storing-and-retrieving-utc-from-database/115885/15 "2026-06-09T10:00:16Z")

</div>

In case it wasn't obvious from the replies, the ms sql jdbc driver doesn't support the datetimeoffset data type with ignition

---

<div class="post-metadata">

**Author:** ![Zachary\_Kacel1](https://avatars.discourse-cdn.com/v4/letter/z/ea666f/32.png) [@Zachary\_Kacel1](https://forum.inductiveautomation.com/u/Zachary_Kacel1)\
**Post date:** [June 9, 2026, 11:28am UTC](https://forum.inductiveautomation.com/t/storing-and-retrieving-utc-from-database/115885/16 "2026-06-09T11:28:17Z")

</div>

So without the datetimeoffset field was is the best way in Ignition and MSSQL(which I can't change) to work in UTC time when the servers are both Eastern?

---

<div class="post-metadata">

**Author:** ![Chris\_Bingham](https://avatars.discourse-cdn.com/v4/letter/c/e5b9ba/32.png) [@Chris\_Bingham](https://forum.inductiveautomation.com/u/Chris_Bingham)\
**Post date:** [June 9, 2026, 12:26pm UTC](https://forum.inductiveautomation.com/t/storing-and-retrieving-utc-from-database/115885/17 "2026-06-09T12:26:51Z")

</div>

If an event happens at 10a Eastern, what time do you want to be displayed for a client viewing that event while on Central time?

---

<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:** [June 9, 2026, 12:28pm UTC](https://forum.inductiveautomation.com/t/storing-and-retrieving-utc-from-database/115885/18 "2026-06-09T12:28:18Z")

</div>

Probably just do the math to convert to the appropriate time zone, using the `system.date` functions.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 9, 2026, 12:32pm UTC](https://forum.inductiveautomation.com/t/storing-and-retrieving-utc-from-database/115885/19 "2026-06-09T12:32:32Z")

</div>

Is abandoning the project an option?  
I'm only half joking.. Any "fix" you apply will have to be applied everywhere to all queries when dealing with datetimes. And they will be more like "breaks". Gross and not fun
