MCPcopy Index your code
hub / github.com/ccxt/ccxt / Iso8601

Method Iso8601

java/lib/src/main/java/io/github/ccxt/base/Time.java:163–173  ·  view source on GitHub ↗
(Object ts)

Source from the content-addressed store, hash-verified

161 DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").withZone(ZoneOffset.UTC);
162
163 public static String Iso8601(Object ts) {
164 if (ts == null) return null;
165 final long ms;
166 try {
167 ms = Long.parseLong(String.valueOf(ts));
168 } catch (NumberFormatException e) {
169 return null;
170 }
171 if (ms < 0) return null;
172 return ISO_MILLIS_Z.format(Instant.ofEpochMilli(ms));
173 }
174
175 public static String iso8601(Object ts) {
176 return Iso8601(ts);

Callers 2

iso8601Method · 0.95
iso8601Method · 0.95

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected