Code example for GregorianCalendar

Methods: getTime, setTimeZone

0
	 
	 
	private long getUTCTime(int y, int m ,int d)
	{ 
		 
		GregorianCalendar calendar = new GregorianCalendar(y,m,d);
		// set time zone 
		TimeZone zone = TimeZone.getTimeZone("UTC");
		calendar.setTimeZone(zone);
		return calendar.getTime().getTime()/1000;
		 
		 
	} 
 
	 
 
	@Override 
	protected Dialog onCreateDialog(int id) {
		switch (id) {
		case DATE_DIALOG_ID:
			return new DatePickerDialog(this, mDateSetListener, mStartYear,