@Test (enabled = false) public void testParseUtcTimestamp() { fail("Not yet implemented"); }
public static Date parseUtcTimestamp(final String timestampStr) { Calendar calendar = Calendar.getInstance(UTC_TZ); calendar.clear(); calendar.setTimeZone(UTC_TZ); int year = Integer.parseInt(timestampStr.substring(0, 4)); int month = Integer.parseInt(timestampStr.substring(5, 7)); int day = Integer.parseInt(timestampStr.substring(8, 10)); int hour = Integer.parseInt(timestampStr.substring(11, 13)); int minute = Integer.parseInt(timestampStr.substring(14, 16)); int second = Integer.parseInt(timestampStr.substring(17)); calendar.set(year, month - 1, day, hour, minute, second); return calendar.getTime(); }
Util { public static Date parseUtcTimestamp(final String timestampStr) { Calendar calendar = Calendar.getInstance(UTC_TZ); calendar.clear(); calendar.setTimeZone(UTC_TZ); int year = Integer.parseInt(timestampStr.substring(0, 4)); int month = Integer.parseInt(timestampStr.substring(5, 7)); int day = Integer.parseInt(timestampStr.substring(8, 10)); int hour = Integer.parseInt(timestampStr.substring(11, 13)); int minute = Integer.parseInt(timestampStr.substring(14, 16)); int second = Integer.parseInt(timestampStr.substring(17)); calendar.set(year, month - 1, day, hour, minute, second); return calendar.getTime(); } }
Util { public static Date parseUtcTimestamp(final String timestampStr) { Calendar calendar = Calendar.getInstance(UTC_TZ); calendar.clear(); calendar.setTimeZone(UTC_TZ); int year = Integer.parseInt(timestampStr.substring(0, 4)); int month = Integer.parseInt(timestampStr.substring(5, 7)); int day = Integer.parseInt(timestampStr.substring(8, 10)); int hour = Integer.parseInt(timestampStr.substring(11, 13)); int minute = Integer.parseInt(timestampStr.substring(14, 16)); int second = Integer.parseInt(timestampStr.substring(17)); calendar.set(year, month - 1, day, hour, minute, second); return calendar.getTime(); }  }
Util { public static Date parseUtcTimestamp(final String timestampStr) { Calendar calendar = Calendar.getInstance(UTC_TZ); calendar.clear(); calendar.setTimeZone(UTC_TZ); int year = Integer.parseInt(timestampStr.substring(0, 4)); int month = Integer.parseInt(timestampStr.substring(5, 7)); int day = Integer.parseInt(timestampStr.substring(8, 10)); int hour = Integer.parseInt(timestampStr.substring(11, 13)); int minute = Integer.parseInt(timestampStr.substring(14, 16)); int second = Integer.parseInt(timestampStr.substring(17)); calendar.set(year, month - 1, day, hour, minute, second); return calendar.getTime(); }  static Date parseUtcTimestamp(final String timestampStr); static Long parseUtcTimestampAsLong(final String timestampStr); static String formatUtcTimestamp(final Date timestamp); static String formatUtcTimestamp(final Long timestamp); }
Util { public static Date parseUtcTimestamp(final String timestampStr) { Calendar calendar = Calendar.getInstance(UTC_TZ); calendar.clear(); calendar.setTimeZone(UTC_TZ); int year = Integer.parseInt(timestampStr.substring(0, 4)); int month = Integer.parseInt(timestampStr.substring(5, 7)); int day = Integer.parseInt(timestampStr.substring(8, 10)); int hour = Integer.parseInt(timestampStr.substring(11, 13)); int minute = Integer.parseInt(timestampStr.substring(14, 16)); int second = Integer.parseInt(timestampStr.substring(17)); calendar.set(year, month - 1, day, hour, minute, second); return calendar.getTime(); }  static Date parseUtcTimestamp(final String timestampStr); static Long parseUtcTimestampAsLong(final String timestampStr); static String formatUtcTimestamp(final Date timestamp); static String formatUtcTimestamp(final Long timestamp); static final String MYNAME; static final String UTF8; }