jQuery.countdown
jQuery.countdown copied to clipboard
Timezone issue with moment.js and with client time
After searching for hours I couldn't solve my issue. I saw your example on the plugin's website but whenever I change the machine time, the countdown changes too (on your website too!). The strange thing is that a few months ago it was working!
Here is my code
<script> var countUTC = moment.tz('<?php echo $countdownField->format(DATE_ISO8601); ?>', "Europe/Athens"); $('div#clock').countdown(countUTC.toDate()) .on('update.countdown', function(event) { $(this).html(event.strftime('<?php _e('%D days %H:%M:%S', 'sometextdomain'); ?>')); }) .on('finish.countdown', function(event) { $(this).html('Available! Refresh the page').css('font-size', '2rem'); });; </script>
Can you reproduce the issue by changing your computer's time on your website's example?
Thanks!
I've noticed the same problem. Will have a look at that solution...