I am using:
$(function () {
endAuction = new Date(
data.year,
data.month,
data.day,
data.hour,
data.minute,
data.second
);
$('#defaultCountdown').countdown('destroy')
$('#defaultCountdown').countdown({
until: endAuction,
format: 'DHMS',
onExpiry: endAuctionReload
//,onTick: highlightLast5
});
});
to create a countdown timer from a time sent by an ajax call (PHP file) however this wont work if a user changes their local clock. Is there a way to force the server time as opposed to the local time?
What countdown plugin are you using? Check the documentation. If it’s this one, there is a
serverSyncoption that does the following: