Returning different at Locale script console and perspective component

import locale as l

if I run the above in script console it returns “en_GB”
But if I run the same on Change script on DateTimeInput component it returns “en_US”

session.props.locale is “en_GB”

Perspective component scripts run in the gateway. Your gateway is using a different locale from your designer. In Perspective, you must always deliberately use the locale from your session properties. Also, you really should be using the Java ZoneId class, not jython’s locale module.

1 Like

@pturmel okay. Thanks for that :+1:. Is it possible to change the designers locale?

I’m sure there’s a JVM argument you could use. In the designer launcher settings:


As an accident of history, if you’ve got Vision installed you can change the Timezone Behavior property and the designer will (upon the next restart) take the given timezone:

Thanks. The designer is taking the given time zone but the perspective components aren’t. It would be great if the locale of DateTimeInput component can change its locale to based on the locale of the Designer ie. session.props.locale