Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloud.com.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJos Poortvliet <jospoortvliet@gmail.com>2021-07-05 17:01:09 +0300
committerJos Poortvliet <jospoortvliet@gmail.com>2021-07-05 17:01:09 +0300
commitaf081736c6fcee967aab41165f5deb46beb5fc95 (patch)
tree498caca6238832da6814edcab5f6ed326abb4e5b /page-countdown.php
parenta692a7a3dac2ccaa0885c1e3a448d481d556c270 (diff)
fix time ;-)
Signed-off-by: Jos Poortvliet <jospoortvliet@gmail.com>
Diffstat (limited to 'page-countdown.php')
-rw-r--r--page-countdown.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/page-countdown.php b/page-countdown.php
index 4c85e01e..52383af6 100644
--- a/page-countdown.php
+++ b/page-countdown.php
@@ -18,7 +18,7 @@
/**
* Event date in UTC, modify the string!!
*/
-const eventDateUTC = new Date('06 July 2021 12:59:59');
+const eventDateUTC = new Date('06 July 2021 10:59:59');
// Start the counter
$(document).ready(function(){
@@ -43,18 +43,18 @@ const updateCounter = function() {
}
/**
- * Gets the time left from the event date to
+ * Gets the time left from the event date to
*/
const getTimeLeft = function(eventDateUTC) {
const now = new Date
// Time left in milliseconds (UTC)
- const timeLeftUTC = eventDateUTC - now
+ const timeLeftUTC = eventDateUTC - now
// Offset to local timezone in milliseconds
- let offset = now.getTimezoneOffset() * 60000
-
+ let offset = now.getTimezoneOffset() * 60000
+
// Time left in milliseconds
const timeLeft = timeLeftUTC - offset
@@ -69,7 +69,7 @@ const getTimeLeft = function(eventDateUTC) {
millisecondsLeft = millisecondsLeft % 3600000
const minutesLeft = format(Math.floor(millisecondsLeft / 60000))
- // get seconds left
+ // get seconds left
millisecondsLeft = millisecondsLeft % 60000
const secondsLeft = format(Math.floor(millisecondsLeft / 1000))