I'm currently trying to format a DB UTC timestamp to the local timezone. For that I'm trying this:
new Date( "2020-03-13 18:40:45 UTC".replace( /\s/, 'T' ) )
First I had this:
new Date( "2020-03-13 18:40:45 UTC" )
Which works in Chrome and Firefox but not in Safari. So I did some research and came up with the replace. Because of my replace I'm getting now Invalid Date
in every browser. I've now idea why... What can I do to fix this?