Passing this function a text = "2006-11-20T15:16:24.000+0000" resulted in no exceptions (my timezone is "Europe/Berlin").
Running this function under JDK 5.0 throws the following exception: java.text.ParseException: Unparseable date: "2006-11-20T15:16:24.000+0000"
I believe that the cause of the problem are the last 5 digits of the text - string in combination with the current timezone. That seems to have changed since jdk 1.4.2.
My problem now is that I just get a string like the one above and want to convert it to a date without setting a prober timezone (just like running this code under jdk 1.4.2). How can I accopmplish this under jdk 1.5?
Thanks in advance for any answers...
[ August 09, 2008: Message edited by: Karl Weber ]
[ August 09, 2008: Message edited by: Karl Weber ] [ August 09, 2008: Message edited by: Karl Weber ]
Originally posted by Joe Ess: Welcome to the JavaRanch. I've heard others complain of a change in the way date formats were handled in 1.4 and 1.5, but I didn't pursue it further.
Thanks for the link...
Joined: Aug 08, 2008
Actually this problem occured in combination with IBM Websphere (as mentioned in the linked post). Currently I'm using RAD (Rapid Application Developer) 6 which works with JDK 1.4.2 and RAD 7 which works with JDK 5.0.
But because the SimpleDateFormat - class is from the package java.text I believe that the problem is not IBM related but is JDK - specific...
subject: String to Date Convertion with JDK 1.4.2 and JDK 5.0