Code example for GregorianCalendar

Methods: getTime, set

0
		assertEquals("", query.getRowSetModifiers());
		assertEquals(expectedFilters, query.toString());
	} 
 
	private static Date getUTCDate(int year, int month, int day, int hour, int minute, int second) {
		GregorianCalendar calendar = new GregorianCalendar(TimeZone.getTimeZone("utc"));
		int dateMonth = month - 1;
		calendar.set(year, dateMonth, day, hour, minute, second);
		calendar.set(Calendar.MILLISECOND, 0);
 
		return calendar.getTime();
	} 
 
	public void testDate() throws Throwable { 
 
		// Create query 
 
		MobileServiceQuery<?> query = table.where().field("birthdate").eq().val(getUTCDate(1986, 6, 30, 0, 0, 0));
 
		// Assert 
		String expectedFilters = "birthdate eq '1986-06-30T00:00:00.000Z'";