# America/Mexico\_City timezone is wrong

**URL:** <https://forum.inductiveautomation.com/t/america-mexico-city-timezone-is-wrong/76029>\
**Category:** Ignition\
**Tags:** ignition81, scripting, database, python\
**Created:** [July 6, 2023, 9:39pm UTC](https://forum.inductiveautomation.com/t/america-mexico-city-timezone-is-wrong/76029 "2023-07-06T21:39:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alvaro\_Jimenez](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@Alvaro\_Jimenez](https://forum.inductiveautomation.com/u/Alvaro_Jimenez)\
**Post date:** [July 6, 2023, 9:39pm UTC](https://forum.inductiveautomation.com/t/america-mexico-city-timezone-is-wrong/76029/1 "2023-07-06T21:39:41Z")

</div>

I am using the transaction groups to save some data from my plcs to a DB, including an automatic timestamp which as I understand depends on the Gateway's time. I thought my timezone was wrong because my logs appear always one hour forward on the real time.

I tried print system.date.getTimezone() in the script console and it shows: America/Mexico\_City, which is the correct timezone. But when i use system.date.now() I get one hour forward. So if right now is 15:20, I get 16:20. Can timezones in any way controlled by me or how could I solve this problem?

Thanks in advanced!

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [July 6, 2023, 9:40pm UTC](https://forum.inductiveautomation.com/t/america-mexico-city-timezone-is-wrong/76029/2 "2023-07-06T21:40:57Z")

</div>

> [@Gateway datetime wrong](https://forum.inductiveautomation.com/t/gateway-datetime-wrong/75707/2):
>
> Upgrade to the latest available version of Ignition. When the Mexico DST change happened it required an update to the TZ database, which is distributed as part of the Java runtime, and we keep the Java runtime up to date in Ignition releases.
