Skip to content

Commit

Permalink
Fix Sale class
Browse files Browse the repository at this point in the history
  • Loading branch information
distantnative committed Nov 21, 2024
1 parent f254e7d commit bf70043
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions site/plugins/buy/src/Sale.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ public function __construct()
// same timestamp to avoid off-by-one errors in the second of a date change
static::$time ??= time();

// calculate timestamps in UTC, even if the server uses a different timezone
// calculate timestamps in UTC,
// even if the server uses a different timezone
$this->start = strtotime(($options['start'] ?? '1970-01-01') . ' 00:00Z');
$this->end = strtotime(($options['end'] ?? '9999-01-01') . ' 24:00Z');
$this->end = strtotime(($options['end'] ?? '1970-01-01') . ' 24:00Z');
$this->discount = $options['discount'] ?? 0;
}

Expand Down

0 comments on commit bf70043

Please sign in to comment.