I need to get the user’s local timezone offset via the browser in my Vaadin 12.0.0 application. I tried retrieving the WebBrowser object for the session but the timezoneOffset is always 0 and the timeZoneId is null. Is this a bug or am I going about this the wrong way?
Browser is Chrome, I can see that the offset is provided by Chrome when I run the following JavaScript code snippet:
var offset = new Date().getTimezoneOffset(); console.log(offset);
Hi, it looks like a bug. VaadinSession.getCurrent().getBrowser().getTimezoneOffset() always returns 0 for me too. Can you please file a new issue? https://github.com/vaadin/flow/issues