Moment js handle zulu date time


I have problem retriving data from an api and display it in local time.

API print to me zulu datetime 2021-11-12T14:30:29.000000Z I’ve tried varius soluton to transform it to Europe/Rome gtm but anyone worked, considering olso DST..

moment(d.acktime, "YYYYMMDDHHmmss").utcOffset('Europe/Rome').format("HH:mm");

moment(d.acktime, "YYYYMMDDHHmmss").tz("Europe/Rome").format("HH:mm");

The data displayed is always the zulu tume coming form api.. any ideas??

Source: JavaSript – Stack Overflow

November 12, 2021
Category : News
Tags: javascript | momentjs

Leave a Reply

Your email address will not be published. Required fields are marked *

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.