Skip to content

Commit

Permalink
Changed the default expiretime to tommorow @3 am :) (#102)
Browse files Browse the repository at this point in the history
* Changed the default expiretime to tommorow @3 am :)

* Big Mange has ruled

Co-authored-by: Mathias Magnusson <mathias@magnusson.space>

* F**k you

Co-authored-by: Mathias Magnusson <mathias@magnusson.space>

---------

Co-authored-by: Isac Åström <kiastrom@kth.se>
Co-authored-by: Mathias Magnusson <mathias@magnusson.space>
  • Loading branch information
3 people authored Nov 7, 2024
1 parent 5542b4c commit ac47849
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export BUILDPACK_URL='https://github.com/AdmitHub/meteor-buildpack-horse.git'
export LOGIN_KEY=... #Deal with it
export NODE_TLS_REJECT_UNAUTHORIZED=0
13 changes: 12 additions & 1 deletion client/scripts/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,20 @@ Template.dashboard.events({

if(date != "Invalid Date") {
//If you want to change how the date is visually displayed see slide.html
date.setHours(4, 0, 0, 0);
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

// If 04:00 has already passed today, set it for tomorrow
if (new Date() >= nextFourAM) {
nextFourAM.setDate(nextFourAM.getDate() + 1);
}
obj.expire = nextFourAM;
}

// I wish I had a date :'(
var report = function(success, identifier) {
if(success) {
var obj_cp = {_id: identifier}
Expand Down

0 comments on commit ac47849

Please sign in to comment.