### Question:
DateTimeUtils { @Deprecated public static Date localDateToUTC(Date dtLocal) { if (dtLocal == null) { return null; } TimeZone tz = TimeZone.getDefault(); int currentOffsetFromUTC = tz.getRawOffset() + (tz.inDaylightTime(dtLocal) ? tz.getDSTSavings() : 0); return new Date(dtLocal.getTime() - currentOffsetFromUTC); } private  DateTimeUtils(); static String javaDateToTimeSpan(final Date date, Context context, long currentTime); static String javaDateToTimeSpan(final Date date, Context context); static Date dateFromIso8601(final String strDate); static Date dateUTCFromIso8601(String iso8601date); static String iso8601FromDate(Date date); static String iso8601UTCFromDate(Date date); @Deprecated static Date nowUTC(); @Deprecated static Date localDateToUTC(Date dtLocal); static int daysBetween(Date dt1, Date dt2); static int hoursBetween(Date dt1, Date dt2); static int minutesBetween(Date dt1, Date dt2); static int secondsBetween(Date dt1, Date dt2); static long millisecondsBetween(Date dt1, Date dt2); static boolean isSameYear(Date dt1, Date dt2); static boolean isSameMonthAndYear(Date dt1, Date dt2); static long timestampFromIso8601(final String strDate); static long timestampFromIso8601Millis(final String strDate); static Date dateFromTimestamp(long timestamp); static String iso8601FromTimestamp(long timestamp); static String iso8601UTCFromTimestamp(long timestamp); static String timeSpanFromTimestamp(long timestamp, Context context);  }### Answer:
@Test @Ignore(value = "This test is failing because `DateTimeUtils.localDateToUTC` doesn't work as expected. I've " + "marked it as deprecated and this tests serves just as a documentation.") public void testLocalDateToUTC() { TimeZone.setDefault(TimeZone.getTimeZone("GMT+2:00")); Date date = new Date(mDefaultDate); assertThat(DateTimeUtils.iso8601FromDate(date)).isEqualTo("2019-07-30T12:54:18+0200"); String actual = DateTimeUtils.iso8601FromDate(DateTimeUtils.localDateToUTC(date)); assertThat(actual).isEqualTo("2019-07-30T10:54:18+00:00"); }