I have a countdown-timer on my wordpress page, I use the countdown from the Ultimate Addon-Pack for Visual Composer.
At first it worked properly in Chrome but in Firefox only NaN was shown.
I did some research and found out, that I have to put a "T" between date and time >> "2016:05:22T20:00:00"
Then it worked properly in Firefox but in Chrome it shows 2 hours too much.
Firefox:
24 Days 07 Hours 01 Minute 11 Seconds
Chrome:
24 Days 09 Hours 01 Minute 11 Seconds
How can I fix this?
Is it an option to just use an existing Framework?
If yes, then just use Moment.js for this: http://momentjs.com/
or Bootstrap TimePicker: http://jdewit.github.io/bootstrap-timepicker/
With these two Frameworks you can parse a time-string into a DateTime