You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the pink date selection boxes are showing different dates than the dates the pictures were generated.
If I select the dates from the date picker manually, the images shows however, when I click on the pink boxes, it shows empty content most of the time, and the dates are incorrect compared to the folder names generated in the output directory.
Looking at the directory dates vs the pink boxes, it looks like the pink boxes dates are offset by one day.
After playing a bit with the code, I found out this was due to how JS processes dates, and how it uses UTC time by default, which was not matching my timezone (EST, UTC-5), hence the date discrepancy.
I made it work by adjusting the following two functions:
constgoDate=(e)=>{console.log("goDate("+e.target.value+")");// Changed the direct entry into Date with a split version of the date string broken by year, month, dayletwd_sp=e.target.value.split("-");// split date into its partsconstday=newDate(parseInt(wd_sp[0]),parseInt(wd_sp[1])-1,parseInt(wd_sp[2]));// loading parts directly in Date objectconsole.log("day="+day);day.setDate(day.getDate());console.log("day="+day);setDate(day);}
and
functiontoggleCalendar(){if(!promiseAll){newjBox('Notice',{content: "All logs and images are not processed. Please wait...",theme: 'TooltipDark',attributes: {x: "right",y: "bottom"},offset: {x: 20,y: 45}});return;}if(workingDates.length>0){letlist="";for(leti=0;i<workingDates.length;i++){letwd_sp=workingDates[i].split("-");// Same principle, splitting date into its partsletdt=newDate(parseInt(wd_sp[0]),parseInt(wd_sp[1])-1,parseInt(wd_sp[2]));// loading parts directly in Date objectlist+="<div class='workingDate' onclick='loadDay("+i+")'>"+dt.toLocaleDateString()+" <span class='nbImages'>"+detailDates[workingDates[i]]+" <span>📷</span></span></div>"}$("div#calendarList").html(list).toggle();}if(modeSearch){$("div#calendarList").hide();}}
The text was updated successfully, but these errors were encountered:
Hello,
I noticed that the pink date selection boxes are showing different dates than the dates the pictures were generated.
If I select the dates from the date picker manually, the images shows however, when I click on the pink boxes, it shows empty content most of the time, and the dates are incorrect compared to the folder names generated in the
output
directory.Looking at the directory dates vs the pink boxes, it looks like the pink boxes dates are offset by one day.
After playing a bit with the code, I found out this was due to how JS processes dates, and how it uses UTC time by default, which was not matching my timezone (EST, UTC-5), hence the date discrepancy.
I made it work by adjusting the following two functions:
and
The text was updated successfully, but these errors were encountered: