Currently we have this code, which works, except it needs to use a specified timezone, rather than the user's timezone:
$('#countdown').countdown('<?php echo $date_end?>').on('update.countdown', function(event) {
var format = '%-S second%!S';
if (event.offset.years > 0 || event.offset.weeks > 0 || event.offset.days > 0 || event.offset.hours > 0 || event.offset.minutes > 0) {
if(event.offset.minutes > 0) {
format = '%-M minute%!M ' + format;
}
if(event.offset.hours > 0) {
format = '%-H hour%!H ' + format;
}
if(event.offset.days > 0) {
format = '%-d day%!d ' + format;
}
if(event.offset.weeks > 0) {
format = '%-w week%!w ' + format;
}
}
$(this).html(event.strftime(format));
}).on('finish.countdown', function(event) {
$(this).html('Finished');
});
I have seen several examples of adding timezones, but none are using the jquery countdown plugin in the same way we are.
Any ideas on how to add +10 as the current timezone? so it uses that rather than the user's timezone?
Thanks.