我尝试将此倒计时 jQuery 脚本的日期格式从本地时间更改为 UTC,但更改后它不起作用。我什至在那里问过,但没有得到答案。
<script>
$(function(){
var note = $('#note'),
ts = new Date.UTC(2012, 0, 1),
$('#countdown').countdown({
timestamp: ts,
callback: function(days, hours, minutes, seconds) {
var message = "";
message += days + " day" + ", ";
message += hours + " hour" + ", ";
message += minutes + " minutes" + " & ";
message += seconds + " seconds" + " <br />";
message += "time left";
note.html(message);
}
});
});
</script>
我改变了这个:
ts = new Date(2012, 0, 1),
进入
ts = new Date.UTC(2012, 0, 1),