Printing now(), different output, I am confused

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:

{ Read the whole thing. }

1 Like