Kuan
Kuan

Reputation: 11389

How to make time string with timezone works in IE11

All:

I wonder how can I build a Date() object from a string like:

2016-05-31 07:35:22+02:00

In IE 11?

In Firefox and Chrome, I can simply use new Date("2016-05-31 07:35:22+02:00") but not work in IE11

Any idea? Thanks

Upvotes: 1

Views: 1670

Answers (1)

jonny
jonny

Reputation: 3098

Add a T before the time in the string:

new Date('2016-05-31T07:35:22+02:00')

That worked in IE for me

Upvotes: 2

Related Questions