Skip to content
Snippets Groups Projects
Unverified Commit 8dece1dc authored by meskio's avatar meskio :tent:
Browse files

Use UTC timezone to refund orders

The order deadline is stored in UTC but we were comparing it to the
local timezone to decide if we need to close it.

* Closes: #27
parent c20d1533
No related branches found
No related tags found
No related merge requests found
......@@ -386,7 +386,7 @@ func updateOrderPurchase(tx *gorm.DB, memberNum int, transaction *Transaction, t
func (d *DB) DeactivateOrders() []Order {
var orders []Order
now := time.Now()
now := time.Now().UTC()
err := d.db.Where("active = ? AND deadline < ?", true, now).
Preload("Member").
Preload("Transactions.OrderPurchase.OrderProduct.Product").
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment