What I do is that I call Page.retrieveExtendedClientDetails(); when Vaadin calls me back with ExtendedClientDetails I store that information into the session.
Afterwards you can use the similar code to retrieve the time zone:
val ExtendedClientDetails.timeZone: ZoneId
get() = if (!timeZoneId.isNullOrBlank()) {
// take into account zone ID. This is important for historical dates, to properly compute date with daylight savings.
ZoneId.of(timeZoneId)
} else {
// fallback to time zone offset
ZoneOffset.ofTotalSeconds(timezoneOffset / 1000)
}
Due to the bootstrapping process differences V14 doesn’t get all the information from the client like V8 did.
To get the extended details you should use:
From the returned extendedClientDetails you should find the same extended data as was available in V8.
The JavaScript execution has changed to UI.getCurrent().getPage().executeJs(String expression, Serializable... parameters) or then you can use Component.getElement().executeJs(String expression, Serializable... parameters)