(instant: Date, timeZone: string)
| 115 | * the true instant always lives alongside it (e.g. a task's `runAt`). |
| 116 | */ |
| 117 | export function zonedClockDate(instant: Date, timeZone: string): Date { |
| 118 | const [datePart, timePart] = zonedWallClock(instant, timeZone).split('T') |
| 119 | const [year, month, day] = datePart.split('-').map(Number) |
| 120 | const [hour, minute] = timePart.split(':').map(Number) |
| 121 | return new Date(year, month - 1, day, hour, minute) |
| 122 | } |
| 123 | |
| 124 | /** The UTC offset (ms, east-positive) of `timeZone` at a given instant. */ |
| 125 | function timezoneOffsetMs(instant: Date, timeZone: string): number { |
no test coverage detected