MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / buildId

Method buildId

Ports/CLDC11/src/java/time/ZoneOffset.java:72–91  ·  view source on GitHub ↗
(int totalSeconds)

Source from the content-addressed store, hash-verified

70 }
71
72 private static String buildId(int totalSeconds) {
73 if (totalSeconds == 0) {
74 return "Z";
75 }
76 int abs = Math.abs(totalSeconds);
77 int hours = abs / 3600;
78 int minutes = (abs % 3600) / 60;
79 StringBuffer sb = new StringBuffer();
80 sb.append(totalSeconds < 0 ? '-' : '+');
81 if (hours < 10) {
82 sb.append('0');
83 }
84 sb.append(hours);
85 sb.append(':');
86 if (minutes < 10) {
87 sb.append('0');
88 }
89 sb.append(minutes);
90 return sb.toString();
91 }
92}

Callers 1

ZoneOffsetMethod · 0.95

Calls 3

absMethod · 0.95
appendMethod · 0.95
toStringMethod · 0.95

Tested by

no test coverage detected