Fix Bug : daterange adds UTC offset on user change

mitchross-coral-installer-update
Moe Alam 2020-12-19 09:03:40 -08:00
parent d42da0e873
commit d1132604da
2 changed files with 3 additions and 3 deletions

View File

@ -486,7 +486,7 @@ $(document).ready(function(e){
videoSet = 'cloudVideos'
break;
}
e.videoURL=getApiPrefix() + '/'+videoSet+'/'+e.ke+'/'+e.mid+'?limit='+e.limit+'&start='+e.dateRange.startDate.utc().format('YYYY-MM-DDTHH:mm:ss')+'&end='+e.dateRange.endDate.utc().format('YYYY-MM-DDTHH:mm:ss');
e.videoURL=getApiPrefix() + '/'+videoSet+'/'+e.ke+'/'+e.mid+'?limit='+e.limit+'&start='+e.dateRange.startDate.clone().utc().format('YYYY-MM-DDTHH:mm:ss')+'&end='+e.dateRange.endDate.clone().utc().format('YYYY-MM-DDTHH:mm:ss');
$.getJSON(e.videoURL,function(d){
d.pages=d.total/100;
$('.video_viewer_total').text(d.total)

View File

@ -30,8 +30,8 @@ $(document).ready(function(e){
}
var getSelectedTime = function(asUtc){
var dateRange = dateSelector.data('daterangepicker')
var startDate = dateRange.startDate
var endDate = dateRange.endDate
var startDate = dateRange.startDate.clone()
var endDate = dateRange.endDate.clone()
if(asUtc){
startDate = startDate.utc()
endDate = endDate.utc()