Bug 13143: Use defaults for timezone when config is null or empty

Status 13143: resolved fixed
Reviewed-By: Nitin
This commit is contained in:
kishan 2012-01-30 14:26:15 +05:30
parent 1e38c289aa
commit fd182b806e

View File

@ -175,7 +175,9 @@ public class UsageManagerImpl implements UsageManager, Runnable {
m_sanityCheckInterval = Integer.parseInt(sanityCheckInterval);
}
if(aggreagationTimeZone != null && !aggreagationTimeZone.isEmpty()){
m_usageTimezone = TimeZone.getTimeZone(aggreagationTimeZone);
}
s_logger.debug("Usage stats aggregation time zone: "+aggreagationTimeZone);
try {
@ -196,7 +198,7 @@ public class UsageManagerImpl implements UsageManager, Runnable {
m_jobExecTime.set(Calendar.MINUTE, minutes);
m_jobExecTime.set(Calendar.SECOND, 0);
m_jobExecTime.set(Calendar.MILLISECOND, 0);
if(execTimeZone != null){
if(execTimeZone != null && !execTimeZone.isEmpty()){
m_jobExecTime.setTimeZone(TimeZone.getTimeZone(execTimeZone));
}