Merge "Always use local timezone for parsing date" into qt-qpr1-dev

This commit is contained in:
TreeHugger Robot
2019-12-05 02:49:13 +00:00
committed by Android (Google) Code Review

View File

@@ -111,7 +111,7 @@ public class MainlineModuleVersionPreferenceController extends BasePreferenceCon
try {
final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern,
Locale.getDefault());
simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
simpleDateFormat.setTimeZone(TimeZone.getDefault());
return Optional.of(simpleDateFormat.parse(text));
} catch (ParseException e) {
// ignore and try next pattern