private static TimeZone getTimeZone(TimeZone timeZone, Map<String, ? extends Object> context) { if (timeZone == null) { timeZone = (TimeZone) context.get("timeZone"); if (timeZone == null && context.containsKey("autoUserLogin")) { Map<String, String> autoUserLogin = UtilGenerics.cast(context.get("autoUserLogin")); timeZone = UtilDateTime.toTimeZone(autoUserLogin.get("lastTimeZone")); } if (timeZone == null) { timeZone = TimeZone.getDefault(); } } return timeZone; }