Always use local timezone for parsing date

Use local time zone to be in line with entry
in phonesky mainline module.

Test: Rebuild
Bug: 143357811
Change-Id: I1ecf57ec7952cff580af932e58c453622d4536f0
This commit is contained in:
Tsung-Mao Fang
2019-12-03 16:57:00 +08:00
parent 5dd4272ee4
commit be895aea4c

View File

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