mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-27 16:02:43 +00:00
* 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>
15 lines
470 B
TypeScript
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
|
|
}
|
|
})
|