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

enter image description here

but in chrome (version 28.0.1500.95m) not working : wrong output :

enter image description here

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

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -