我正在使用按鈕來更新帶有日期和時間戳的表單域。現在的問題是請求已經完成,以便隨時使用這些請求,它們將被更新到中央時區。任何人都可以幫助我更新下面的內容,以便我可以適應?JavaScript獲取時間中心時區
function getTimeStamp() {
var now = new Date();
return ((now.getMonth() + 1) + '/' + (now.getDate()) + '/' + now.getFullYear() + " " + now.getHours() + ':' +
((now.getMinutes() < 10) ? ("0" + now.getMinutes()) : (now.getMinutes())) + ':' + ((now.getSeconds() < 10) ? ("0" + now
.getSeconds()) : (now.getSeconds())));
}
function setTime() {
document.getElementById('InsertRecordDate_Received').value = getTimeStamp();
}