提交 fb28c029 authored 作者: noelgrandin's avatar noelgrandin

getTimeTry() was never being passed a null timezone, so don't check for that.…

getTimeTry() was never being passed a null timezone, so don't check for that. Rather check if the timezone is still the default, so we can use the local cached Calendar.
上级 c6bcac80
...@@ -387,7 +387,7 @@ public class DateTimeUtils { ...@@ -387,7 +387,7 @@ public class DateTimeUtils {
int year, int month, int day, int hour, int minute, int second, int year, int month, int day, int hour, int minute, int second,
int millis) { int millis) {
Calendar c; Calendar c;
if (tz == null) { if (tz == TimeZone.getDefault()) {
c = getCalendar(); c = getCalendar();
} else { } else {
c = Calendar.getInstance(tz); c = Calendar.getInstance(tz);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论