Android examples for java.util:Timezone
Create Calendar from timezone and clear its value
import java.util.Calendar; import java.util.TimeZone; public class Main { private static final TimeZone TIME_ZONE = TimeZone.getTimeZone("Asia/Tokyo"); public static Calendar firstDate() { Calendar cal = Calendar.getInstance(TIME_ZONE); cal.set(Calendar.DATE, 1);/* w w w. j av a2 s . co m*/ cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); return cal; } }