-1

How do I convert the Australian Eastern Daylight Time to just AEST? Currently it outputs like 11/11/2022 15:29:25 Australian Eastern Daylight Time. Expected output would be like 11/11/2022 15:29:25 AEDT

import { formatInTimeZone } from 'date-fns-tz'
import auLocale from 'date-fns/locale/en-AU'

formatInTimeZone(
        new Date(value),
        'Australia/Sydney',
        'dd/MM/yyyy HH:mm:ss zzzz',
        { locale: auLocale }
      )
Joseph
  • 7,042
  • 23
  • 83
  • 181

1 Answers1

2

Use zzz for the format of the timezone instead of zzzz.

Sample: 'dd/MM/yyyy HH:mm:ss zzzz'

Ken Labso
  • 885
  • 9
  • 13