### Question:
DateTimeField extends FormComponentPanel<Date> { public final Integer getHours() { return hours; } DateTimeField(final String id);  DateTimeField(final String id, final IModel<Date> model); final AM_PM getAmOrPm(); final Date getDate(); final Integer getHours(); final Integer getMinutes(); @Override String getInput(); final void setAmOrPm(final AM_PM amOrPm); final void setDate(final Date date); final void setHours(final Integer hours); final void setMinutes(final Integer minutes); @Override void convertInput(); static Date changeTimeZone(Date date, TimeZone zone);  }### Answer:
@Test public void testTimeZones() { DateTimeZone defaultTimeZone = DateTimeZone.getDefault(); try { DateTimeZone.setDefault(DateTimeZone.forID("UTC")); final String clientTimezone = "America/Toronto"; DateTime jan01_10am = new DateTime(2013, 01, 01, 10, 0, 0, DateTimeZone.forID(clientTimezone)); DateTimeField dateTimeField = new DateTimeField("foo", Model.of(jan01_10am.toDate())) { private static final long serialVersionUID = 1L; @Override protected TimeZone getClientTimeZone() { return TimeZone.getTimeZone(clientTimezone); } }; tester.startComponentInPage(dateTimeField); assertEquals(jan01_10am.getHourOfDay(), dateTimeField.getHours().intValue(), "The hour of day is incorrect!"); } finally { DateTimeZone.setDefault(defaultTimeZone); } }