Fix countdown in dashboard

This commit is contained in:
Nabil Kadimi
2019-03-13 14:01:07 +00:00
committed by GitHub
parent 3d09397603
commit e96f533c56

View File

@@ -466,15 +466,8 @@ jQuery(document).ready(function($){
// Iterate every second // Iterate every second
var x = setInterval(function() { var x = setInterval(function() {
// Get todays date and time
var now = new Date();
// Convert curent date and time to UTC
var tzDifference = now.getTimezoneOffset();
var nowutc = new Date(now.getTime() + tzDifference * 60 * 1000);
// Find the distance between now and the count down date // Find the distance between now and the count down date
var distance = countDownDate - nowutc; var distance = countDownDate - (new Date);
if ( distance < 0 ) { if ( distance < 0 ) {
distance = 0; distance = 0;
} }