I am using jQuery FlipClock to show a countdown timer for a given date time. So to show countdown timer with given date and time in FlipClock I got this link. In my case the end date is
8th December 2015, 12:0:0
So as per the link above I made my code like this
var date = new Date(Date.UTC(2015, 12, 8, 12, 0, 0));
var now = new Date();
var diff = date.getTime()/1000 - now.getTime()/1000;
var clock;
clock = $('.clock').FlipClock({
clockFace: 'DailyCounter',
autoStart: false,
callbacks: {
stop: function() {
$('.message').html('The clock has stopped!')
}
}
});
clock.setTime(diff);
clock.setCountdown(true);
clock.start();
<div class="clock"></div>
But its showing countdown dates in wrong. So may I know why I am getting this error? How to solve the issue? Any suggestion or advice is really appreciable. Thanks
Here is my fiddle link