Set specific timezone in JavaScript
new Date(Date.parse('07.08.2013 08:00'))
returns Mon Jul 08 2013 08:00:00 GMT+0700
On my server I can set specific timezone and pass it to client code
(JavaScript)
Java will return for example Europe/Berlin. Javascript can not parce it:
new Date(Date.parse('07.08.2013 08:00 Europe/Berlin')) // output error
Calculating timezone offset on the server side is always pain in the ass.
Does anybody know any good practice to set specific timezone in javascript?
No comments:
Post a Comment