← Back to team overview

openjdk team mailing list archive

[Bug 275654] Re: "Unparseable date"

 

I also confirm no issues.


jem@fawkes:~/t$ cat DateTimeParseTest.java 
import java.util.*;
import java.text.*;

public class DateTimeParseTest {
    public static void main(String a[]) throws Exception {
        DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss z");
        System.out.println(df.format(new Date()));
        System.out.println(df.format(df.parse("20081001175000 CET")));
    }   
}


jem@fawkes:~$ java -version 
java version "1.6.0_0"
IcedTea6 1.3.1 (6b12-0ubuntu6) Runtime Environment (build 1.6.0_0-b12)
OpenJDK Client VM (build 1.6.0_0-b12, mixed mode, sharing)


jem@fawkes:~/t$ java DateTimeParseTest 
20081029073120 EST
20081001185000 CEST

-- 
"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: Invalid
Status in “openjdk-6” source package in Ubuntu: Triaged

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