This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Problem with a date/time value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Problem with a date/time value" Watch "Problem with a date/time value" New topic
Author

Problem with a date/time value

Fred Victa
Ranch Hand

Joined: May 01, 2008
Posts: 124
I have a computer program that receives an XML file from a client and one of things in that XML file is a value for the date/time. There was a situation where I received an XML file from a client and this was the value for the date/time: 2008-09-17T02:00:00-04:00, which means September 17, 2008 2:00am Eastern Standard Time. My computer program converted this date/time value into Pacific Standard Time and stored the date, 2008-09-16, in my database. How can I prevent my computer program from converting that date/time value into Pacific Standard Time? I do not want my computer program to convert the date/time value into Pacific Standard Time.
Shashank Agarwal
Ranch Hand

Joined: May 20, 2004
Posts: 105
What's the code that you're using?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem with a date/time value