# Printing now(), different output, I am confused

**URL:** <https://forum.inductiveautomation.com/t/printing-now-different-output-i-am-confused/83341>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 20, 2023, 3:24am UTC](https://forum.inductiveautomation.com/t/printing-now-different-output-i-am-confused/83341 "2023-12-20T03:24:14Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [December 20, 2023, 11:53am UTC](https://forum.inductiveautomation.com/t/printing-now-different-output-i-am-confused/83341/4 "2023-12-20T11:53:44Z")

</div>

You get the timezone that applies at the point where the `java.util.Date`, which is itself purely UTC, is converted to a string. If in the gateway process, it will be the gateway's time zone. If in the designer (like the tag browser), it will be the designer's time zone. If in the perspective client using a native component's date formatting, it will be the session time zone. Perspective scripts and expressions run in the gateway. If you want those to use the session timezone, you have to apply it yourself, with Java.

This topic should help:

> [@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…

{ Read the whole thing. }

---

_[View the full topic](https://forum.inductiveautomation.com/t/printing-now-different-output-i-am-confused/83341)._
