Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

CMP bean and timezones  RSS feed

 
Brian Nice
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a test client that I run on my machine that inserts a row into a database. My client machine is in Eastern Standard Time. My test program creates the date on the client, calls a session bean facade on the server, which is in GMT timezone, which in turns calls create on an Entity bean to insert the row into the database.
When the row gets inserted into the database, it is inserted in GMT (5 hours ahead of the date I created on the client). The session and entity bean are not doing any manipulation of the date, just passing it around, ultimately to the create method of the entity bean.
Where is the date getting converted from EST to GMT?
Thanks
Brian
 
Sergiu Truta
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My guess is that because you are using dates the conversion from Eastern Time to GMT happens inside the Date object. I mean this is a great feature of the Date object that it can manipulate different timezones. You might try to use longs and only when storing the date this should be translated into a date object.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!