NGClient Timezone

Forum to discuss the new web client version of Servoy.

NGClient Timezone

Postby steve1376656734 » Wed Mar 20, 2019 2:37 pm

I need to display date/time values in an NG client as GMT(BST) no matter what timezone my user is located in but seem totally unable to do this.

My scenario is this:

DB: PostgreSQL Field: Timestamp without timezone
Server: TImezone is set to 'Europe/London'

I am in the UK and use the NG client to enter a date/time into the system 20 Mar 2019 13:30:00. It is stored in the DB as the GMT date time I entered. I display it on the screen and it shows the correct date/time (20 Mar 2019 13:30:00). I now "fly" to Australia (Perth) and bring up the same record but the date/time displayed is the one I entered but converted to the browsers local timezone so I see 20 Mar 2019 21:30:00 displayed on the screen

I tried using i18n.setTimeZone('Europe/London') when the user logs in but I get an error in the log that says:
Code: Select all
WARN com.servoy.j2db.util.Debug - Setting TimeZone on NG client is not allowed
   at eval:0

This is despite the documentation saying that this function is supported in the NG client:
timezone.png

Can anyone suggest how I can achieve what I want please?

Thanks
Steve
You do not have the required permissions to view the files attached to this post.
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 221
Joined: Fri Aug 16, 2013 2:38 pm
Location: Lanzarote

Re: NGClient Timezone

Postby Joas » Tue Apr 16, 2019 12:10 pm

I think you need to change the property servoy.use.client.timezone on the admin page, see https://wiki.servoy.com/display/DOCS/Locale+Settings
Joas de Haan
Yield Software Development: Need help on your project?
yieldsd.com
User avatar
Joas
Site Admin
 
Posts: 808
Joined: Mon Mar 20, 2006 4:07 pm
Location: Amersfoort, NL

Re: NGClient Timezone

Postby steve1376656734 » Tue Apr 16, 2019 12:34 pm

Hi Joas,

Thanks for the reply. The problem with changing the flag on the admin page is that if you are also supporting web clients on the same server then they then get a problem with timezones. I have logged a bug report with Servoy and it looks like there is a fix for the issue coming in 2019.06 that basically gets the NG client to ignore the admin flag and rely solely on the flag within the formatting option that is called "Use as LocalDateTime (NG Client Only)"

NG Time Format.png
You do not have the required permissions to view the files attached to this post.
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 221
Joined: Fri Aug 16, 2013 2:38 pm
Location: Lanzarote


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 0 guests