wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android 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: 86
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
 
Similar Threads
Dealing with results of java time code
Windows SBS 2008 and timezone (DST) problem in Europe/Berlin
Convert String to Java Date
Convert Local time to UTC and vice versa
DST issue with GregorianCalendar