We currently have this code that works, except that it should use the specified time zone, not the user's time zone:
$('#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 saw some examples of adding time zones, but no one uses the jquery countdown plugin like we do.
Any ideas on how to add +10 as your current timezone? why does he use this, not the user's timezone?
Thanks.
source share