Gateway Timezones and Script function behavior

NO

Don't do arithmetic with dates to correct for time zones. java.util.Date objects are fundamentally UTC under the hood, representing a worldwide point in time, and trying to "adjust" them to correct for timezones simply makes them incorrect. If you pass incorrect timestamps to historian calls or other system functions, you will get wrong answers.

These objects are stringified in the timezone of the JVM that does the string conversion, and are created by string parsing in the timezone of the JVM that does the parsing.

If you want to stringify or parse in a timezone other than the JVM's timezone, you must use the zone-aware java data types.

2 Likes