Client browser timezone offset

2019-10-28 Thread Calin Pavel
I'm trying to detect what is the current timezone offset for a client browser accessing my Wicket application. I found out that BrowserInfoForm.ClientPropertiesBean contains details about: - utcOffset - utcDstOffset but these are calculated at 1.Jan and 1.June. Is there any way to determine on ser

Client browser timezone offset

2019-10-28 Thread Calin Pavel
I'm trying to detect what is the current timezone offset for a client browser accessing my Wicket application. I found out that BrowserInfoForm.ClientPropertiesBean contains details about: - utcOffset - utcDstOffset but these are calculated at 1.Jan and 1.June. Is there any way to determine on ser

Re: Client browser timezone offset

2019-10-28 Thread Maxim Solodovnik
Hello, according to stackoverflow [1] you can use Intl.DateTimeFormat().resolvedOptions().timeZone ClientProperties can be extended to get this info on server [1] https://stackoverflow.com/questions/6939685/get-client-time-zone-from-browser On Mon, 28 Oct 2019 at 22:26, Calin Pavel wrote: > I'

Re: Client browser timezone offset

2019-10-28 Thread Maxim Solodovnik
@devs are we supporting IE11 for wicket9? if not we can add this call to standard ClientProperties ... WDYT? On Mon, 28 Oct 2019 at 22:48, Maxim Solodovnik wrote: > Hello, > > according to stackoverflow [1] > you can use Intl.DateTimeFormat().resolvedOptions().timeZone > ClientProperties can be

Re: Client browser timezone offset

2019-10-28 Thread Maxim Solodovnik
On the other hand: the old code can be used if TZ is not available I'll do some tests and will create PR On Mon, 28 Oct 2019 at 22:51, Maxim Solodovnik wrote: > @devs are we supporting IE11 for wicket9? if not we can add this call to > standard ClientProperties ... > WDYT? > > On Mon, 28 Oct 201

Re: Client browser timezone offset

2019-10-28 Thread Martin Grigorov
Hi, I didn't get what is the problem with the current code. For me http://examples8x.wicket.apache.org/ajaxhellobrowser/ shows utcDSTOffset=3 utcOffset=2 which seems to be correct. On Mon, Oct 28, 2019 at 5:56 PM Maxim Solodovnik wrote: > On the other hand: the old code can be used if TZ is not

Re: Client browser timezone offset

2019-10-28 Thread Calin Pavel
Current code is working ok. There is no problem with it. But it gives you the UtcOffset at 1.Jan.2019 and UtcDstOffset at 1.June.2019. But I do not know how to determine what is the CURRENT timezone offset (for Date.NOW) On 10/28/2019 6:24 PM, Martin Grigorov wrote: Hi, I didn't get what i

Log feedback messages

2019-10-28 Thread Entropy
As part of a larger effort to improve our audit logs, I have been requested to add the feedback messages that appear as part of validation to those audits. So in the onError() of a button or form, where the validation has failed, I need to gather (non-destructively) the feedback messages that will

Re: Client browser timezone offset

2019-10-28 Thread Maxim Solodovnik
@Calin, you can use (new Date().getTimezoneOffset() / -60); Then you can use code like this http://examples8x.wicket.apache.org/ajaxhellobrowser/wicket/bookmarkable/org.apache.wicket.examples.source.SourcesPage;jsessionid=01612235C0920A71B39B2D8CA0FA641A?0&SourcesPage_class=org.apache.wicket.exampl

Re: Log feedback messages

2019-10-28 Thread Martin Grigorov
Hi, On Mon, Oct 28, 2019 at 7:33 PM Entropy wrote: > As part of a larger effort to improve our audit logs, I have been requested > to add the feedback messages that appear as part of validation to those > audits. So in the onError() of a button or form, where the validation has > failed, I need