a working show instance select.
This commit is contained in:
parent
ab8cf60fe3
commit
0c379ef840
3 changed files with 75 additions and 13 deletions
|
@ -35,6 +35,22 @@ var AIRTIME = (function(AIRTIME){
|
|||
};
|
||||
};
|
||||
|
||||
mod.fnGetSecondsEpoch = function(oDate) {
|
||||
var iTime,
|
||||
iServerOffset,
|
||||
iClientOffset;
|
||||
|
||||
iTime = oDate.getTime(); //value is in millisec.
|
||||
iTime = Math.round(iTime / 1000);
|
||||
iServerOffset = serverTimezoneOffset;
|
||||
iClientOffset = oDate.getTimezoneOffset() * -60;//function returns minutes
|
||||
|
||||
//adjust for the fact the the Date object is in client time.
|
||||
iTime = iTime + iClientOffset + iServerOffset;
|
||||
|
||||
return iTime;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the schedule range start in unix timestamp form (in seconds).
|
||||
* defaults to NOW if nothing is selected.
|
||||
|
@ -69,15 +85,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
//0 based month in js.
|
||||
oDate = new Date(date[0], date[1]-1, date[2], time[0], time[1]);
|
||||
|
||||
iTime = oDate.getTime(); //value is in millisec.
|
||||
iTime = Math.round(iTime / 1000);
|
||||
iServerOffset = serverTimezoneOffset;
|
||||
iClientOffset = oDate.getTimezoneOffset() * -60;//function returns minutes
|
||||
|
||||
//adjust for the fact the the Date object is in client time.
|
||||
iTime = iTime + iClientOffset + iServerOffset;
|
||||
|
||||
return iTime;
|
||||
return mod.fnGetSecondsEpoch(oDate);
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue