I have a string with the following format "2018-04-24 11:56:27+0000"
. This is a UTC time and it should be converted to local time.
I want to create a Date Object that represents the same date in Chrome, Firefox, Edge and IE (all latest). This format works for all browsers except IE. I use it like
new Date("2018-04-24 11:56:27+0000")
I can not change the format because it comes from another service (I only could reformat it in my frontend logic). Is there a way to create a Date Object from this also in IE, or is there any conversion algorithm to convert this format to some IE compatible format in Javascript and only for IE?
Javascript Invalid Date Error in Internet Explorer does not solve my problem because they use local time, not UTC in constructos. I can't do the same with UTC times