Function
override
(
base: Date,
year = base.getFullYear(),
month = base.getMonth(),
day = base.getDate(),
hour = base.getHours(),
minute = base.getMinutes(),
)
Source from the content-addressed store, hash-verified
| 55 | Intl.DateTimeFormat().resolvedOptions().timeZone || process.env.tz; |
| 56 | const HOUR = 1000 * 60 * 60; |
| 57 | const override = ( |
| 58 | base: Date, |
| 59 | year = base.getFullYear(), |
| 60 | month = base.getMonth(), |
| 61 | day = base.getDate(), |
| 62 | hour = base.getHours(), |
| 63 | minute = base.getMinutes(), |
| 64 | ) => new Date(year, month, day, hour, minute); |
| 65 | |
| 66 | dstOnly( |
| 67 | `works at DST-start boundary in local timezone: ${tzName || "(unknown)"}`, |
Tested by
no test coverage detected