jquery - Javascript new Date() outputs 'YYYY-MM-DD hh:mm:ss' data as UTC although it's not -


i have simple line of code need date output in modal, emerges when click on entry in fullcalendar-script calendar. looks this:

 eventclick: function(calevent, jsevent, view) {             $('#modalstart').html(new date(calevent.start));              $('#modalend').html(new date(calevent.end)); }, 

the json data gets interpreted (start , end) formatted yyyy-mm-dd h:i:s , want stay that. modal new date outputs following:

start: tue aug 02 2016 06:00:00 gmt+0200 (mitteleuropäische sommerzeit)

end: mon aug 15 2016 08:00:01 gmt+0200 (mitteleuropäische sommerzeit)

although should be

start: tue aug 02 2016 04:00:00

end: mon aug 15 2016 06:00:01

i'm sure there simple solutio this. tried .html(new date(date.utc())) didn't work. i'd thankful if help.

whatever you're planning do, should trick:

eventclick: function(calevent, jsevent, view) {             $('#modalstart').html(new date(calevent.start).toutcstring());              $('#modalend').html(new date(calevent.end).toutcstring()); }, 

Comments

Popular posts from this blog

timer - Java TimerTask cancel -

android - How to read a column value in parse.com without accessing an object or a pointer -

ios - NSDateFormatter: error in converting date -