From e96f533c5608b4e89f1480cb4ef044e7b4fba0b3 Mon Sep 17 00:00:00 2001 From: Nabil Kadimi Date: Wed, 13 Mar 2019 14:01:07 +0000 Subject: [PATCH] Fix countdown in dashboard --- assets/js/admin/sportspress-admin.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/assets/js/admin/sportspress-admin.js b/assets/js/admin/sportspress-admin.js index e660a847..d6ab00ae 100644 --- a/assets/js/admin/sportspress-admin.js +++ b/assets/js/admin/sportspress-admin.js @@ -466,15 +466,8 @@ jQuery(document).ready(function($){ // Iterate every second 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 - var distance = countDownDate - nowutc; + var distance = countDownDate - (new Date); if ( distance < 0 ) { distance = 0; }