Permalink
Browse files

BBB-98, BBB-99: Patch after a second round of tests

  • Loading branch information...
1 parent 4adf9d2 commit 1653d3a9e79ad52d4660cb97bf93db47bd7f0753 @jfederico jfederico committed Jan 30, 2014
@@ -158,8 +158,8 @@
{var statusClass = m.joinable ? 'status_joinable_' : (m.notStarted ? 'status_notstarted' : 'status_finished')}
{var statusText = m.joinable ? (m.joinableMode == 'available'? bbb_status_joinable_available: m.joinableMode == 'inprogress'? bbb_status_joinable_inprogress: m.joinableMode == 'unavailable'? bbb_status_joinable_unavailable: bbb_status_joinable_unreachable ) : (m.notStarted ? bbb_status_notstarted : bbb_status_finished)}
<td id="meeting_status_${m.id}" class="${statusClass}${m.joinableMode}">${statusText}</td>
- <td>${m.startDate ? new Date( parseInt(m.startDate) - parseInt(bbbBrowserTimeZoneOffset) + parseInt(bbbUserTimeZoneOffset) ).toISO8601String() : ''}</td>
- <td>${m.endDate ? new Date( parseInt(m.endDate) - parseInt(bbbBrowserTimeZoneOffset) + parseInt(bbbUserTimeZoneOffset)).toISO8601String() : ''}</td>
+ <td>${m.startDate ? new Date( parseInt(m.startDate) - parseInt(bbbBrowserTimeZoneOffset) + parseInt(bbbUserTimeZoneOffset) + ( (new Date()).dst() && !(new Date( parseInt(m.startDate) - parseInt(bbbBrowserTimeZoneOffset) + parseInt(bbbUserTimeZoneOffset))).dst()? 3600000: !(new Date()).dst() && (new Date( parseInt(m.startDate) - parseInt(bbbBrowserTimeZoneOffset) + parseInt(bbbUserTimeZoneOffset))).dst()? (3600000 * -1): 0 ) ).toISO8601String() : ''}</td>
+ <td>${m.endDate ? new Date( parseInt(m.endDate) - parseInt(bbbBrowserTimeZoneOffset) + parseInt(bbbUserTimeZoneOffset) + ( (new Date()).dst() && !(new Date( parseInt(m.endDate) - parseInt(bbbBrowserTimeZoneOffset) + parseInt(bbbUserTimeZoneOffset))).dst()? 3600000: !(new Date()).dst() && (new Date( parseInt(m.endDate) - parseInt(bbbBrowserTimeZoneOffset) + parseInt(bbbUserTimeZoneOffset))).dst()? (3600000 * -1): 0 ) ).toISO8601String() : ''}</td>
<td>${m.ownerDisplayName}</td>
</tr>
{/if}
@@ -217,8 +217,8 @@ function switchState(state,arg) {
var now_local = new Date(parseInt(now_utc.getTime()) + parseInt(bbbUserTimeZoneOffset));
var now_local_plus_1 = new Date(parseInt(now_utc.getTime()) + parseInt(bbbUserTimeZoneOffset) + 3600000);
- var startDate = (!isNew && meeting.startDate) ? new Date(parseInt(meeting.startDate) - parseInt(bbbBrowserTimeZoneOffset) + parseInt(bbbUserTimeZoneOffset)) : now_local;
- var endDate = (!isNew && meeting.endDate) ? new Date(parseInt(meeting.endDate) - parseInt(bbbBrowserTimeZoneOffset) + parseInt(bbbUserTimeZoneOffset)) : now_local_plus_1;
+ var startDate = (!isNew && meeting.startDate) ? new Date(parseInt(meeting.startDate) - parseInt(bbbBrowserTimeZoneOffset) + parseInt(bbbUserTimeZoneOffset) + ( (new Date()).dst() && !(new Date( parseInt(meeting.startDate) - parseInt(bbbBrowserTimeZoneOffset) + parseInt(bbbUserTimeZoneOffset))).dst()? 3600000: !(new Date()).dst() && (new Date( parseInt(meeting.startDate) - parseInt(bbbBrowserTimeZoneOffset) + parseInt(bbbUserTimeZoneOffset))).dst()? (3600000 * -1): 0 ) ) : now_local;
+ var endDate = (!isNew && meeting.endDate) ? new Date(parseInt(meeting.endDate) - parseInt(bbbBrowserTimeZoneOffset) + parseInt(bbbUserTimeZoneOffset) + ( (new Date()).dst() && !(new Date( parseInt(meeting.endDate) - parseInt(bbbBrowserTimeZoneOffset) + parseInt(bbbUserTimeZoneOffset))).dst()? 3600000: !(new Date()).dst() && (new Date( parseInt(meeting.endDate) - parseInt(bbbBrowserTimeZoneOffset) + parseInt(bbbUserTimeZoneOffset))).dst()? (3600000 * -1): 0 ) ) : now_local_plus_1;
// Setup time picker
var zeropad = function (num) { return ((num < 10) ? '0' : '') + num; }
@@ -115,15 +115,9 @@ var BBBUtils;
startMillis = date.getTime();
startMillis += time[0] * 60 * 60 * 1000;
startMillis += time[1] * 60 * 1000;
-
- date.setTime(startMillis);
startMillis -= date.getTimezoneOffset() * 60 * 1000;
startMillis += (parseInt(bbbUserTimeZoneOffset) * -1);
-
date.setTime(startMillis);
- if( today.dst() != date.dst() ){
- startMillis = startMillis + 3600000;
- }
jQuery('#startDate').val(startMillis);
}else{
@@ -136,15 +130,9 @@ var BBBUtils;
endMillis = date.getTime();
endMillis += time[0] * 60 * 60 * 1000;
endMillis += time[1] * 60 * 1000;
-
- date.setTime(endMillis);
endMillis -= date.getTimezoneOffset() * 60 * 1000;
endMillis += (parseInt(bbbUserTimeZoneOffset) * -1);
-
date.setTime(endMillis);
- if( today.dst() != date.dst() ){
- endMillis = endMillis + 3600000;
- }
jQuery('#endDate').val(endMillis);
}else{

0 comments on commit 1653d3a

Please sign in to comment.