cc-2683: not using utc time

-top panel now start at correct time
This commit is contained in:
martin 2011-08-16 15:04:41 -04:00
parent 41fd5f2543
commit 8aa26b2eb0
4 changed files with 55 additions and 51 deletions

View file

@ -13,6 +13,8 @@ var currentElem;
var serverUpdateInterval = 5000;
var uiUpdateInterval = 200;
var timezoneOffset = 0;
//set to "development" if we are developing :). Useful to disable alerts
//when entering production mode.
var APPLICATION_ENV = "";
@ -169,7 +171,7 @@ function updatePlaybar(){
}
/* Column 2 update */
$('#time').text(convertDateToHHMMSS(estimatedSchedulePosixTime));
$('#time').text(convertDateToHHMMSS(estimatedSchedulePosixTime + timezoneOffset));
}
function calcAdditionalData(currentItem){
@ -209,7 +211,7 @@ function parseItems(obj){
calcAdditionalShowData(obj.nextShow);
var schedulePosixTime = convertDateToPosixTime(obj.schedulerTime);
schedulePosixTime += parseInt(obj.timezoneOffset)*1000;
timezoneOffset = parseInt(obj.timezoneOffset)*1000;
var date = new Date();
localRemoteTimeOffset = date.getTime() - schedulePosixTime;
}