From 349f7f262179c47b9b7ec623d3fb0ae1a385ea6f Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Wed, 24 May 2017 21:09:47 +0300 Subject: [PATCH] Use timezone when setting payment date --- app/Ninja/PaymentDrivers/BasePaymentDriver.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Ninja/PaymentDrivers/BasePaymentDriver.php b/app/Ninja/PaymentDrivers/BasePaymentDriver.php index 38336ef7e7aa..be6f22002736 100644 --- a/app/Ninja/PaymentDrivers/BasePaymentDriver.php +++ b/app/Ninja/PaymentDrivers/BasePaymentDriver.php @@ -606,6 +606,7 @@ class BasePaymentDriver public function createPayment($ref = false, $paymentMethod = null) { + $account = $this->account(); $invitation = $this->invitation; $invoice = $this->invoice(); $invoice->markSentIfUnsent(); @@ -618,7 +619,7 @@ class BasePaymentDriver $payment->client_id = $invoice->client_id; $payment->contact_id = $invitation->contact_id; $payment->transaction_reference = $ref; - $payment->payment_date = date_create()->format('Y-m-d'); + $payment->payment_date = $account->getDateTime()->format('Y-m-d'); $payment->ip = Request::ip(); $payment = $this->creatingPayment($payment, $paymentMethod);