Code example for SimpleTimeZone

Methods: setEndRule, setStartRule

0
		 
		 // get the supported ids for GMT-04:00 (Eastern Standard Time) 
		 String[] ids = TimeZone.getAvailableIDs(-4 * 60 * 60 * 1000);
 
		 // create a Pacific Standard Time time zone 
		 SimpleTimeZone est = new SimpleTimeZone(-4 * 60 * 60 * 1000, ids[0]);
 
		 // set up rules for daylight savings time 
		 est.setStartRule(Calendar.APRIL, 1, Calendar.SUNDAY, 2 * 60 * 60 * 1000);
		 est.setEndRule(Calendar.OCTOBER, -1, Calendar.SUNDAY, 2 * 60 * 60 * 1000);
 
		 calendar = new GregorianCalendar(est);
		 Date trialTime = new Date();
		 calendar.setTime(trialTime);
	} 
	 
	private static void mark251(){ 
		Marker mark251 = mMap.addMarker(new MarkerOptions()
        .position(new LatLng(38.992668,  -76.949722))
        .title("251"));