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

Method stripUtcSuffix

java/lib/src/main/java/io/github/ccxt/base/Time.java:147–156  ·  view source on GitHub ↗
(String s)

Source from the content-addressed store, hash-verified

145 // accept the trailing zone word; java.time's strict parsers do not.
146 // Strip a trailing " UTC"/" GMT" so the rest of the parsing succeeds.
147 private static String stripUtcSuffix(String s) {
148 int len = s.length();
149 if (len >= 4) {
150 String tail = s.substring(len - 4);
151 if (tail.equalsIgnoreCase(" UTC") || tail.equalsIgnoreCase(" GMT")) {
152 return s.substring(0, len - 4).trim();
153 }
154 }
155 return s;
156 }
157
158 // -------- iso8601 formatting --------
159

Callers 2

parseDateMethod · 0.95
parse8601Method · 0.95

Calls 1

lengthMethod · 0.45

Tested by

no test coverage detected