1

There is the following string - "2013-10-23 11:56:29" and timezone name "Europe/Moscow". I hoped to parse it into Date using Date.parse() or new Date(string), but it doesn't work. How can I do it? Thanks.

malcoauri
  • 11,904
  • 28
  • 82
  • 137

2 Answers2

1

see the ISO formats: YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS

developer.mozilla.org - JavaScript Date

Converting string to date in js

Community
  • 1
  • 1
mehdi
  • 1,755
  • 2
  • 15
  • 21
0

Use moment.js (http://momentjs.com/docs/#/parsing/string/) and moment timezone (http://momentjs.com/timezone/docs/) for the timezone.

pax162
  • 4,735
  • 2
  • 22
  • 28