Files
windmill/frontend/src/lib/components/dateTimeInput.test.ts
T
AlexRV12andRuben Fiszel 4186ffff84 fix: spell the schedule pause time the way the picker writes it (#11875)
* fix: make the schedule editor's saved baseline reactive

* fix: spell the schedule pause time the way the picker writes it

* fix: read a zone-less naive date-time as wall-clock time

---------

Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
2026-10-19 23:19:38 +02:00

15 lines
470 B
TypeScript

import { expect, it } from 'vitest'
import { parseDateTime } from './dateTimeInput'
it('reads a zone-less naive value as its digits, outside UTC too', () => {
const tz = process.env.TZ
process.env.TZ = 'Europe/Paris'
try {
expect(parseDateTime('2027-09-09T10:00', 'naive').getUTCHours()).toBe(10)
expect(parseDateTime('2027-09-09T10:00', 'local').getUTCHours()).toBe(8)
} finally {
if (tz === undefined) delete process.env.TZ
else process.env.TZ = tz
}
})