Closed SaudQureshi1997 closed 1 year ago
Etc/GMT-6 should subtract 6 hours from UTC and display something like: Luxon version: ^3.3.0 Node Version: 15.14.0
UTC DateTime: 2023-06-16T10:00:00.000+00:00 Etc/GMT-6: 2023-06-16T02:00:00.000-06:00
Where as:
Etc/GMT-6 displays: 2023-06-16T16:00:00.000+06:00
Code:
const dateTime = DateTime.fromJSDate( new Date("2023-06-16T10:00:00.000+00:00") ).setZone("Etc/GMT-6"); console.log({ dateTime: dateTime.toString(), })
The Etc/GMT zones are opposite of what you would expect. Etc/GMT-6 is 6 hours ahead of UTC. See here.
Etc/GMT-6 should subtract 6 hours from UTC and display something like: Luxon version: ^3.3.0 Node Version: 15.14.0
Where as:
Code: