Incorrect timezone offset in WebClient

Dates in WebClient are returning back incorrect offset, even though it shows correct time zone. For example:
“now:” + new Date()
Will return:
Now:Fri Dec 04 2009 22:00:57 GMT-0000 (EST) - In WebClient
Now:Fri Dec 04 2009 17:00:57 GMT-0500 (EST) - In SmartClient

Notice the time zone of EST is correct, but hour offset is incorrect. Server and client are in same time zone. As well as Servoy Admin page shows:
Current time: Fri Dec 04 17:00:57 EST 2009
Also interesting is that:
“TimeZone Offset:” + i18n.getTimeZoneOffset(i18n.getCurrentTimeZone())
returns:
TimeZone Offset:-18000000 - In both Smart and Web.

servoy.use.client.timezone is true.
Servoy version 4.1.4 -build 681
java.version=1.6.0_15-b03
Windows Server 2003 Service Pack 2

Any ideas? This causes big problems in web client when I have a relationship based on the date to show related data.

are you talking here purely on dates that are in mem or also on database dates?
If database dates what is the setting of “servoy.use.client.timezone” in the admin page?
do you have that on false or true? please set it to true.

i just make a quick example that fills in a form dataprovider with what you also do like "now: " + new Date();
and when i do this in the web i get:

now: Mon Dec 07 2009 13:37:02 GMT+0100 (CET)

and in the smart i get:

now: Mon Dec 07 2009 13:37:06 GMT+0100 (CET)

I tested this all on localhost (server and both clients) and 1 setup where 2 clients on a different machine where talking to the same app server.

This was a weird one. Had to do a full server restart, and play with the Server timezone settings. Seems like sometimes Windows Server 2003 can read timezone from incorrect registry, and if it hasn’t update from the network time server in a while, you can get some weird issues. Changed from time.windows.com to time.apple.com for a more reliable time as well ;) So, after playing with some settings, and a restart, all is back to normal.

I have a question for Servoy about i18n.getTimezoneOffset().

i18n.getTimeZoneOffset(timezone, date) will give the offset in effect in the specified timezone at the specified date. This is incredibly useful because it will even take into account whether daylight savings is in effect at the specified date. What I’m wondering is, how is the ‘data’ behind this maintained? Countries change their daylight savings rules from time to time - not often but it does happen. Where does that data live, and how will it be updated when these changes occur?

This question also applies to Date.getTimezoneOffset(), seeing it too takes daylight savings into consideration for the current timezone.

Thank you.

That comes from java itself, So you need to update your java version now and then to have the latest
They also have a special tool for that, but more info is here: http://www.oracle.com/technetwork/java/ … 37583.html