C2Util { public static String getTime( ZonedDateTime zonedTime ) { ZonedDateTime newYorkTime = zonedTime.withZoneSameInstant(ZoneId.of("America/New_York")); return formatter.format(newYorkTime); }  static String getFuturesSymbol(FuturesTicker ticker); static Action getTradeAction( TradeOrder order ); static SymbolType getSymbolType( TradeOrder order ); static OrderType getOrderType( TradeOrder order ); static String getC2RootSymbol(String symbol); static String getTime( ZonedDateTime zonedTime ); static final String ROOT_SYMBOL_RUSSEL2K_NYBOT; static final String ROOT_SYMBOL_RUSSEL2K_GLOBEX; static final String ROOT_SYMBOL_NASDAQ_100; static final String ROOT_SYMBOL_MINI_DOW; static final String ROOT_SYMBOL_SP500; static final String ROOT_SYMBOL_CORN; }
@Test public void testGetTime() { ZonedDateTime time = ZonedDateTime.of(2018, 4, 11, 6, 40, 0, 0, ZoneId.of("America/Los_Angeles")); assertEquals("201804110940", C2Util.getTime(time)); }