Closed marcus-sa closed 1 year ago
import { DateTime } from 'luxon'; const now = DateTime.now(); console.log( now.setZone('UTC').toJSDate(), now.setZone('Europe/Copenhagen').toJSDate(), now.setZone('America/New_York').toJSDate(), );
Results in the following being logged
2023-07-17T11:02:34.419Z 2023-07-17T11:02:34.419Z 2023-07-17T11:02:34.419Z
The dates are exactly the same?
I expected the following to be logged
2023-07-17T11:02:34.419Z 2023-07-17T13:02:34.419Z 2023-07-17T15:02:34.419Z
Had to use setZone(..., { keepLocalTime: true })
setZone(..., { keepLocalTime: true })
Results in the following being logged
The dates are exactly the same?
I expected the following to be logged