I just took the JQuery function I found on stackoverflow to update time :
$(document).ready(function () {
var serverTime = new Date();
function updateTime() {
/// Increment serverTime by 1 second and update the html for '#time'
serverTime = new Date(serverTime.getTime() + 1000);
$('#actual_time').html(serverTime);
}
$(function() {
updateTime();
setInterval(updateTime, 1000);
});
})
But now I'm trying, unsuccessfully to change format with a code like this.
serverTime2 = new $.format.date(new Date(serverTime.getTime() + 1000), 'g:i A')
I would like to change de date format to 'g:i A' and I'd also like, instead of serverTime, to apply a specific GMT to my date.
Can you help me please ?