Skip to content

Commit

Permalink
Maybe fix? (II)
Browse files Browse the repository at this point in the history
  • Loading branch information
Isac Åström committed Nov 7, 2024
1 parent ac47849 commit 0893005
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions client/scripts/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ Template.dashboard.events({
date.setDate(date.getDate() + 1);
obj.expire = date;
} else {
let nextFourAM = new Date();
nextFourAM.setHours(4, 0, 0, 0); // Set time to 04:00:00.000
let exp = new Date();
exp.setHours(4, 0, 0, 0); // Set time to 04:00:00.000

// If 04:00 has already passed today, set it for tomorrow
if (new Date() >= nextFourAM) {
nextFourAM.setDate(nextFourAM.getDate() + 1);
if (new Date() >= exp) {
exp.setDate(exp.getDate() + 1);
}
obj.expire = nextFourAM;
obj.expire = exp;
}
// I wish I had a date :'(
var report = function(success, identifier) {
Expand Down

0 comments on commit 0893005

Please sign in to comment.