← Back to team overview

openjdk team mailing list archive

[Bug 275654] Re: "Unparseable date"

 

I don't see any such problem on hardy with openjdk. What is the version
of openjdk you are using? Mine is 6b11-2ubuntu2 which is available in
hardy-updates.

Here is how I used your sample code.
import java.util.*;
import java.text.*;

public class DateTest{
        public static void main (String args[]){
                DateFormat dp = new SimpleDateFormat("yyyyMMddHHmmss z");
                try {
                        Date start = dp.parse("20081001175000 CET");
                } catch (Exception e){
                        System.out.println(e);
                        e.printStackTrace();
                }
        }
}

-- 
"Unparseable date"
https://bugs.launchpad.net/bugs/275654
You received this bug notification because you are a member of OpenJDK,
which is subscribed to openjdk-6 in ubuntu.

Status in “openjdk-6” source package in Ubuntu: New

Bug description:
import java.util.*;
DateFormat dp = new SimpleDateFormat("yyyyMMddHHmmss z");
Date start = dp.parse("20081001175000 CET");

returns "Unparseable date" on OpenJDK 6 on Ubuntu 8.04.1 server, but works with Sub Java 6 on Gentoo.

I suspect it doesn't understand the timezone "CET" and expects a numerical ("+0100" or "+0200", depending on summer / winter time)?



References