I am using DateTime with from ‘luxon’ to display timezones on my application, it is all displaying properly and I am using the .toFormat(‘ZZZZ’) according to the luxon docs and getting back a abbreviation for most places.
This is the line of code:
{DateTime.now().setZone(timezone).toFormat(‘ZZZZ’)}
for timezone I am displaying it as follows:
America/Denver –> MDT
However my problem is whenever I try to do any times with Australia it is displayed as follow
Australia/Sydney –> GMT +10
Australia/Perth –> GMT +8
Is there a way to adjust so that is displays as its proper abbreviation? such as AEDT? and AWST? And not the comparison to GMT
Abby Robinson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.