I'm not sure if this is a bug per-say, but since it would create a situation where your tests pass, but your code would fail, I think we should try and fix it if possible.
This code sample would run ok on Robo, but the code actually fails on a device.
@Test
public void testDateParse() throws ParseException {
String datetime = "Wed Sep 03 12:59:27 BST 2014";
new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy", Locale.ENGLISH)
.parse(datetime);
}
I've explained the problem in the SO answer below, but briefly the issue is that Android doesn't support 3-letter timezone abbreviations other than GMT and UTC, whereas the JVM does for compatibility reasons. So parsing BST works on the JVM, but fails on Android.
http://stackoverflow.com/questions/25668741/british-summer-time-bst-not-recognised-by-simpledateformat-timezone/25669688#25669688
I'm not sure if this is a bug per-say, but since it would create a situation where your tests pass, but your code would fail, I think we should try and fix it if possible.
This code sample would run ok on Robo, but the code actually fails on a device.
I've explained the problem in the SO answer below, but briefly the issue is that Android doesn't support 3-letter timezone abbreviations other than GMT and UTC, whereas the JVM does for compatibility reasons. So parsing BST works on the JVM, but fails on Android.
http://stackoverflow.com/questions/25668741/british-summer-time-bst-not-recognised-by-simpledateformat-timezone/25669688#25669688