Skip to content

Commit

Permalink
More robust out-of-date checking logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathaniel Moschkin committed Nov 18, 2024
1 parent 35e36d8 commit d3cb7fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/logic/celestial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class CelestialMarket {
public get isCurrent(): boolean {
if (!this.lastRefresh) return false;
let now = new Date();
return (now.getHours() - this.lastRefresh.getHours() <= 1);
return now.getDate() === this.lastRefresh.getDate() && (Math.abs(now.getHours() - this.lastRefresh.getHours()) <= 1);
}

constructor() {
Expand Down

0 comments on commit d3cb7fc

Please sign in to comment.