# Question on UTC time, different results in script console and script transform

**URL:** <https://forum.inductiveautomation.com/t/question-on-utc-time-different-results-in-script-console-and-script-transform/95951>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [September 13, 2024, 1:19pm UTC](https://forum.inductiveautomation.com/t/question-on-utc-time-different-results-in-script-console-and-script-transform/95951 "2024-09-13T13:19:11Z")\
**Posts on this page:** 1\
**Showing post:** 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:** [September 13, 2024, 1:58pm UTC](https://forum.inductiveautomation.com/t/question-on-utc-time-different-results-in-script-console-and-script-transform/95951/3 "2024-09-13T13:58:08Z")

</div>

Every time you print a datetime object, `print` performs a string conversion for you. (Because `print` can't print binary objects.) The default string conversion uses the time zone of the JVM where the script is running. The designer is a separate JVM from the gateway, so differences are utterly normal.

See this entire topic to reset your paradigm:

> [@Ignition Perspective Page to show the client System date and time](https://forum.inductiveautomation.com/t/ignition-perspective-page-to-show-the-client-system-date-and-time/73265/8):
>
> Sure. I recommend [DateTimeFormatter.ofPattern()](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/format/DateTimeFormatter.html#ofPattern(java.lang.String)). But I would move the complexity to a project script module with a DateTimeFormatter instance with your preferred pattern saved as a top level variable. Like so, perhaps: from java.time import ZoneId from java.time.format import DateTimeFormatter defaultFormatter = DateTimeFormatter.ofPattern("YYYY-MM-dd HH:mm") def zonedFormat(ts, zoneid, format=None): formatter = defaultFormatter if format is None else DateTimeFormatter.ofPattern(format) r…

(And don't use python's stdlib in jython where there are Java alternatives. Full stop.)

---

_[View the full topic](https://forum.inductiveautomation.com/t/question-on-utc-time-different-results-in-script-console-and-script-transform/95951)._
