mbfishman / java-twitter

Automatically exported from code.google.com/p/java-twitter
Apache License 2.0
0 stars 0 forks source link

The Api not work on non en locale #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
String timeStr = "Tue Mar 31 10:45:27 +0800 2009";
        SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss Z
yyyy");
System.out.println(sdf.parse(timeStr));

this code only work on en locale machines. and the Chinese locale not work.

this pattern should 

        SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss Z
yyyy", Locale.US);

Original issue reported on code.google.com by Rory...@gmail.com on 31 Mar 2009 at 3:03

GoogleCodeExporter commented 9 years ago
Thanks for the bug report and the proposed fix!

Original comment by dclinton on 31 Mar 2009 at 3:09

GoogleCodeExporter commented 9 years ago
Fixed in trunk. Please verify.

Original comment by dclinton on 31 Mar 2009 at 3:41

GoogleCodeExporter commented 9 years ago
thanks. I'll check out the trunk

Original comment by Rory...@gmail.com on 31 Mar 2009 at 3:59