# Why time zone offset is off by 1hr?

**URL:** <https://forum.inductiveautomation.com/t/why-time-zone-offset-is-off-by-1hr/94665>\
**Category:** Ignition\
**Created:** [August 14, 2024, 6:18pm UTC](https://forum.inductiveautomation.com/t/why-time-zone-offset-is-off-by-1hr/94665 "2024-08-14T18:18:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![PRASHANTH\_KAKKIRALA](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@PRASHANTH\_KAKKIRALA](https://forum.inductiveautomation.com/u/PRASHANTH_KAKKIRALA)\
**Post date:** [August 14, 2024, 6:18pm UTC](https://forum.inductiveautomation.com/t/why-time-zone-offset-is-off-by-1hr/94665/1 "2024-08-14T18:18:45Z")

</div>

I see the time zone offset is off by an hour in ignition. What could be causing it?  
Testing with system.date.getTimezoneRawOffset() function.  
I'm in CST/CDT time zone.

Due to this, my CSV imports with timestamps data is displayed with 1 hour offset.

Is it due to daylight saving? how do we address this issue in ignition?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/6/867b693d56228314352df4c15fa2ea83448ed3d9.png)

---

<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:** [August 14, 2024, 6:22pm UTC](https://forum.inductiveautomation.com/t/why-time-zone-offset-is-off-by-1hr/94665/2 "2024-08-14T18:22:14Z")

</div>

> **[TimeZone (Java SE 17 & JDK 17)](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/TimeZone.html#getRawOffset())**
>
> declaration: module: java.base, package: java.util, class: TimeZone

> Returns the amount of time in milliseconds to add to UTC to get standard time in this time zone. Because this value is not affected by daylight saving time, it is called raw offset.

> **[getTimezoneRawOffset | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/appendix/expression-functions/date-and-time/getTimezoneRawOffset)**
>
> Returns the current timezone offset versus UTC, not taking daylight savings into account.

> Description[​](https://docs.inductiveautomation.com/docs/8.1/appendix/expression-functions/date-and-time/getTimezoneRawOffset#description)
> 
> Returns the current timezone offset versus UTC, not taking daylight savings into account.

---

<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:** [August 14, 2024, 6:24pm UTC](https://forum.inductiveautomation.com/t/why-time-zone-offset-is-off-by-1hr/94665/3 "2024-08-14T18:24:06Z")

</div>

Not sure how this relates to your CSV files. Maybe you can explain the problem you're actually having and an example of the data in those files.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [August 15, 2024, 2:02pm UTC](https://forum.inductiveautomation.com/t/why-time-zone-offset-is-off-by-1hr/94665/4 "2024-08-15T14:02:53Z")

</div>

> [@PRASHANTH\_KAKKIRALA](#):
>
> I'm in CST/CDT time zone.

Well...

> **[Central Time Zone](https://en.wikipedia.org/wiki/Central_Time_Zone)**
>
> The North American Central Time Zone (CT) is a time zone in parts of Canada, the United States, Mexico, Central America and some Caribbean islands.
> In parts of that zone (20 states in the US, three provinces or territories in Canada, and several border municipalities in Mexico), the Central Time Zone is affected by two time designations yearly: Central Standard Time (CST) is observed from the first Sunday in November to the second Sunday in March. It is six hours behind Coordinated Universal T...

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

~~Your offset seems right to me. What did you expect ?~~

edit:  
Wait, I think I got it (I'm not super familiar with CST/CDT).  
I'm guessing you were expecting a 5 hours offset because the raw offset should ignore DST ?

edit again:  
I mixed up CST and CDT (REALLY not familiar).  
CDT is offset by 1 for DST, so CST is the one 6 hours behind UTC, which corresponds to the 6 hours offset you get

---

<div class="post-metadata">

**Author:** ![PRASHANTH\_KAKKIRALA](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@PRASHANTH\_KAKKIRALA](https://forum.inductiveautomation.com/u/PRASHANTH_KAKKIRALA)\
**Post date:** [August 15, 2024, 2:08pm UTC](https://forum.inductiveautomation.com/t/why-time-zone-offset-is-off-by-1hr/94665/5 "2024-08-15T14:08:04Z")

</div>

Ok, my csv file has datetime fields data like this  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/a/3a0a8c9577841d79b372eb233cf51c767fd05ad6.png)  
when I import this into ignition, data is getting displayed like this  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/5/952cb89a608f3a3a90b32167fe71e1de0b8a7986.png)

Using Pytz library to convert the timezone to local from UTC  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/7/67b194f7e38b814ee70214feee7001d8d44930c0.png)

Currently the server is located in MO State, CST timezone

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [August 15, 2024, 2:10pm UTC](https://forum.inductiveautomation.com/t/why-time-zone-offset-is-off-by-1hr/94665/6 "2024-08-15T14:10:57Z")

</div>

Don't use python libs for this kind of things, use java's.

Time to guess:  
What's happening here is that the time in your csv is using CDT, so 5 hours behind UTC.  
BUT, your ignition is probably set up to use CST. So you get that 1 hour offset.

---

<div class="post-metadata">

**Author:** ![PRASHANTH\_KAKKIRALA](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@PRASHANTH\_KAKKIRALA](https://forum.inductiveautomation.com/u/PRASHANTH_KAKKIRALA)\
**Post date:** [August 15, 2024, 2:33pm UTC](https://forum.inductiveautomation.com/t/why-time-zone-offset-is-off-by-1hr/94665/7 "2024-08-15T14:33:35Z")

</div>

yes. how do we configure CDT in ignition? and day light saving

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [August 15, 2024, 8:52pm UTC](https://forum.inductiveautomation.com/t/why-time-zone-offset-is-off-by-1hr/94665/8 "2024-08-15T20:52:32Z")

</div>

To compound the problem, the Daylight Savings Time laws were changed some time back.
