CC-3174 : showbuilder

fixing timezone calculations if browser/server is different.
This commit is contained in:
Naomi Aro 2012-02-27 20:14:12 +01:00
parent 28759a2d34
commit 564575d657
3 changed files with 15 additions and 6 deletions

View file

@ -115,10 +115,10 @@ $(document).ready(function() {
iTime = oDate.getTime(); //value is in millisec.
iTime = Math.round(iTime / 1000);
iServerOffset = serverTimezoneOffset;
iClientOffset = oDate.getTimezoneOffset() * 60;//function returns minutes
iClientOffset = oDate.getTimezoneOffset() * -60;//function returns minutes
//adjust for the fact the the Date object is in clent time.
iTime = iTime + iServerOffset + iClientOffset;
//adjust for the fact the the Date object is in client time.
iTime = iTime + iClientOffset + iServerOffset;
return iTime;
}