(isoString: string)
| 186 | |
| 187 | |
| 188 | function parseOffsetMinutes(isoString: string): number | null { |
| 189 | if (isoString.endsWith('Z')) return 0; |
| 190 | const match = isoString.match(/([+-])(\d{2}):(\d{2})$/); |
| 191 | if (!match) return null; |
| 192 | const sign = match[1] === '+' ? 1 : -1; |
| 193 | return sign * (parseInt(match[2]) * 60 + parseInt(match[3])); |
| 194 | } |
| 195 | |
| 196 | function getTimezoneGMT(date: Date, timezone?: string) { |
| 197 | const fmt = getOffsetFormatter(timezone); |
no test coverage detected