Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

date being changed between client and server

$
0
0
SmartGWT version 5.0-p20141231.

I’m running my SmartGWT application on a browser in one time zone (let’s call it time zone A). My application server is in another time zone (time zone B). In a third time zone (time zone C) I’m running a test program.

To Summarize the time zone situation:

Time zone A (offset -60): SmartGWT browser application
Time zone B (offset 0): SmartGWT server application.
Time zone C (offset 420): TestNG/Selenium test.

These computers are in different time zones due to different vendors providing the services I use for my CI test system.

I store a date in a MySQL database using the SmartGWT client DataSource. The date is originally “Sat Mar 06 00:00:00 PST 2004” (milliseconds=1078560000000).

From another computer in time zone C, I retrieve the date from the database using Hibernate/MySQL. When I retrieve the data no Isomorphic code is involved.

The date that was stored using SmartGWT DataSource and then retrieved using Hibernate/MySQL has an 8 hour difference. 8 hours have been added to the original date generated from the SmartGWT browser.

The date I read directly from the MySQL database with the time zone C computer is “Sat Mar 06 08:00:00 PST 2004” (milliseconds=1078560000000).

Why is Isomorphic adding 8 hours to my date in the storage process? Is there any setting I can use to prevent this date transformation?

I would like to have stored in the MySQL database exactly the date in milliseconds originated from the browser application.

Viewing all articles
Browse latest Browse all 4756

Trending Articles