How to get date and time in Moscow from such a string?

Good day, tell me what is the format of the record:
2020-02-14T11:40:44+03:00
And how to convert to human-readable date with an accuracy of minutes?
April 7th 20 at 15:17
1 answer
April 7th 20 at 15:19
Solution
A lot of people on this site consider recording more than chelovekochasov.

Method Date.parse() will eat, and you'll understand this record.
The constructor Date(): const d = new Date('2020-02-14T11:40:44+03:00');
From the resulting Date object, or remove the year, month, day, hour, minute.
d.getFullYear(); // 2020
d.getMonth(); // 1 – the months are from 0 = January
Got it, thanks) - Jeramie commented on April 7th 20 at 15:22
caveat: the date is displayed in the time zone running the code.
The line contains the offset of Moscow (+03:00 in the end) and on my computer the same offset from GMT. But if the string to write +05
2020-02-14T11:40:44+05:00
the date object will take my time "in Moscow" at the same time:
Date Fri Feb 2020 14 09:40:44 GMT+0300 (Moscow Standard Time)

The hour changed from 11 to 09 am. - collin commented on April 7th 20 at 15:25
@shaniya.Schaden15, well, it's not difficult to fix, thank you very much for answers) - Jeramie commented on April 7th 20 at 15:28

Find more questions by tags JavaScript