DateUtil { static String toFormatNoZone(final long timestamp) { final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.US); format.setTimeZone(TimeZone.getDefault()); return format.format(timestamp); }    }
@Test public void toFormatNoZoneTest() { TimeZone.setDefault(TimeZone.getTimeZone("GMT+3")); assertWithMessage("Specimen as GMT+3").that(DateUtil.toFormatNoZone(1536873803123L)).isEqualTo("2018-09-14T00:23:23"); }