`GMT±HH:MM` for an offset expressed in minutes east of UTC (e.g. `GMT-08:00`).
(offsetMinutes: number)
| 51 | |
| 52 | /** `GMT±HH:MM` for an offset expressed in minutes east of UTC (e.g. `GMT-08:00`). */ |
| 53 | function formatGmtOffset(offsetMinutes: number): string { |
| 54 | const sign = offsetMinutes >= 0 ? '+' : '-' |
| 55 | const absMinutes = Math.abs(offsetMinutes) |
| 56 | const hours = String(Math.floor(absMinutes / 60)).padStart(2, '0') |
| 57 | const minutes = String(absMinutes % 60).padStart(2, '0') |
| 58 | return `GMT${sign}${hours}:${minutes}` |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * Timezone options for a picker. Each zone reads as `City (GMT±HH:MM)` — city |
no outgoing calls
no test coverage detected