0

formatted-date-time tag in lwc with Time zone UTC. and out put is coming like 'Montag, 25. November 19, 09:00 UTC', now i want to change UTC to Uhr(German time zone). Is it possible to change time zone in LWC Tried to give different time zone codes in Timezone attribute but it is not accepting other that UTC. Pleas some one help on this.

<lightning-formatted-date-time value={part.Schedule__r.Scheduledate__c} key={part.Id}
                              year="2-digit" month="long" day="2-digit" hour="2-digit" minute="2-digit" time-zone="UTC"
                              time-zone-name="short" weekday="long"></lightning-formatted-date-time>
  • whats the user locale? – Pranay Jaiswal Nov 21 '19 at 9:13
  • Also can you try by removing timezone attribute time-zone="UTC" – Pranay Jaiswal Nov 21 '19 at 9:24
  • I tried removing time-zone time showing with out UTC but i want Uhr along with time – Rajesh P Nov 21 '19 at 10:27
  • User locale is German – Rajesh P Nov 21 '19 at 10:28
0

the component uses IANA timezones, as mentioned in the docs here setting the value to "Europe/Berlin" will display it as GMT+1.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.