Here you can find the source of getCalendar()
private static Calendar getCalendar()
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { private static int zoneOffset; private static Calendar cachedCalendar; private static Calendar getCalendar() { if (cachedCalendar == null) { cachedCalendar = Calendar.getInstance(); zoneOffset = cachedCalendar.get(Calendar.ZONE_OFFSET); }/*from w ww . ja va 2 s . com*/ return cachedCalendar; } }