You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
describe('convertToUTCISO', () => {
it.each([
['2024-03-31T03:01', '2024-03-31T01:01:00.000Z'], // invalid, result: 2024-03-31T02:01:00.000Z
['2024-03-31T03:59', '2024-03-31T01:59:00.000Z'], // invalid, result: 2024-03-31T02:59:00.000Z
['2024-03-31T04:00', '2024-03-31T02:00:00.000Z'], // valid
['2024-03-31T04:01', '2024-03-31T02:01:00.000Z'], // valid
])('should get the correct value for given input %s: [%s]', (value: string, expected: string) => {
// Act
const result = convertToUTCISO(value)
// Assert
expect(result).toBe(expected)
})
})
However the first couple of value & expected pairs of it won't work. To me it acts as if the ST -> DST happens on 4 AM local time as opposed to 3 AM. What's my mistake?
The text was updated successfully, but these errors were encountered:
I'm trying to test my function:
with:
However the first couple of value & expected pairs of it won't work. To me it acts as if the ST -> DST happens on 4 AM local time as opposed to 3 AM. What's my mistake?
The text was updated successfully, but these errors were encountered: