WebClient and Timezone

Hi,

I have a question regarding web clients and timezones. I have a server located in the UK and all my web clients are also located in the UK but if I click on a client in the Servoy administrator it says that their timezone is Africa/Casablanca (see screenshot):

[attachment=0]Servoy Timezone Issue.png[/attachment]

Can anyone explain why the clients have this timezone and how I can set it correctly?

One other oddity is if I dump metadata from my local database and then from the server database and compare the two files then all the timestamps differ by 1 hour which is incredibly annoying when trying to find out what records have changed.

Thanks
Steve

I think this is coming from your server!
So have a look on what timezone, your server is.

Hi Harjo,

Good thought but I had already checked that. The system is running on Centos 6.6 and the system timezone is set to Europe/London, I have also checked the postgresql.conf file and the timezone there is set to “GB”.

Thanks
Steve

no this is comming from the webclient
because the browser doesn’t give us enough info to really see what the exact time zone is
We need to guess it based on timezone offset and dst offset

then the first hit is that Africa/Casablanca

the only thing that can be improved i guess (there is a todo for that in code i believe)
is that if the current timezone offsets match the timezone of the server then just take that one
But that will only fix that specific scenario where the clients are in the exact same timezone as the server

Thanks for clarifying that Johan.

Still not sure why my local development machine and the server differ by 1 hour on the DB timestamps though - guess I’ll need to double check all my config again.

what time stamps are that exactly? where are those generated? Purely by the db or are these configured and generated by servoy?

It is a bit of an odd situation really.

I have a DB on the server which I back up using pg_dump. I then restore it on my developer machine using pg_restore to make sure I have an exact copy of the current live database. I then go on to do some development and when ready to publish I will update the metadata from the DB to the workspace file and check the code into my repository. Finally before publishing the update I change the database connection properties on my developer to point directly to the live database and dump the metadata again in order to compare the two files to see if anything has been changed on the live server prior to publishing the update. At that point the timestamps between the locally dumped data and the server dumped data differ by EXACTLY 1 hour on all records (even though nothing else has changed on them!)

I am at a bit of a loss to explain it.

Thanks
Steve

Not sure if that is your problem, but the other day all my dates were 2 days off even. It turned out that I was using an outdated JDBC driver. That happened with SQL Server…

steve are all the servers/developers/db servers working in the same timezone?

:oops:

Double checked all the configuration and it turns out that the PostgreSQL server on the developer machine was set incorrectly. Changed it to the correct one and rebooted and it seems to be fine now.

Patrick - should I update the JDBC driver every time I update the PostgreSQL server? If so does it need a specific name for the .jar file in the Drivers directory or can I name it with the version number so I can easily see what is happening? Also if I upgrade the developer/application server will it overwrite this driver with the one included with Servoy?

Thanks for all the advice and apologies for my error!

Steve