I am using the countdown here http://keith-wood.name/countdown.html and I have added the server time and everything but now with daylight savings my application adds an extra hour to all countdown times at http://www.artfido.com
I have tried changing the server time to not update with daylight savings but my countdown still has an hour added.
UTC time is +10 but don't know how to change to not have the additional hour.
Code sample
server-time.php
<?php
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Fri, 1 Jan 2010 00:00:00 GMT"); // Date in the past
header("Content-Type: text/plain; charset=utf-8"); // MIME type
$now = new DateTime();
echo $now->format("M j, Y H:i:s O")."
";
?>
Countdown script
$('#defaultCountdown').countdown({
until: endAuction,
serverSync: serverTime,
timezone: +10,
format: 'DHMS',...
function serverTime() {
var time = null;
$.ajax({url: 'server-time.php?random=' + Math.floor(Math.random() * 1000000),
async: false, dataType: 'text',
success: function(text) {
time = new Date(text);
}, error: function(http, message, exc) {
time = new Date();
}});
return time;
}