javascript - `new Date("2013-08-08T09:40")` not working in jweek calendar plugin -
i have problem jquery weekcalendar demo plugin
work in mozilla not in chrome .
i found problem datetime
:
in demo.js
file :
alert(new date("2013-08-08t09:40"));
so work mozilla firefox output fine
but in chrome (version 28.0.1500.95m) not working : wrong output :
so please me out . need same output chrome
proper format is
new date("2013-08-08t09:40z");
http://www.w3.org/tr/note-datetime
if want play local timezone game must manually calculate offset want , use in format:
new date("2013-08-08t09:40+05:30");
it easier use utc though.
if don't want specify timezone, need use different constructor:
new date(2013, 7, 8, 9, 40);
this result in instant dependent on whatever timezone settings user has on computer.
Comments
Post a Comment