Closed puddinator closed 1 year ago
Cannot reproduce:
console.log(new Intl.DateTimeFormat('en', {timeZoneName: 'short', timeZone: 'Asia/Singapore',}).format());
console.log(DateTime.now().setZone('Asia/Singapore').toFormat('ZZZZZ'));
console.log(DateTime.now().setZone('Asia/Singapore').toFormat('ZZZZ'));
Outputs:
4/18/2023, GMT+8
Singapore Standard Time
GMT+8
I'm using Node 18.12 to test. What runtime are you using?
Wow, you're spot on with the issue with version. My bad, I was using an older version of Luxon!
Hi all, thanks for this great library.
For Asia/Singapore time zone,
offsetNameLong
returnsSingapore
which is correct, butoffsetNameShort
remainsGMT
which is wrong. I get the same results fromtoResult('ZZZZZ')
andtoResult('ZZZZ')
respectively.I've read that Luxon gets the offsetName from Intl. Intl returns the correct output
is GMT+8