(int totalSeconds)
| 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 | } |
no test coverage detected