Convert Paypal Standard IPN payment_date to system's time zone
authorJason Gillman Jr <jgillman@miopencarry.org>
Sat, 12 Jan 2019 05:40:14 +0000 (00:40 -0500)
committerJason Gillman Jr <jgillman@miopencarry.org>
Mon, 14 Jan 2019 19:56:30 +0000 (14:56 -0500)
CRM/Core/Payment/PayPalIPN.php

index e854095b902a599d3df5d49129f8dd7d12e315b1..3784a1cfdb4c38c81a3b6be9a5b977e9e34757d6 100644 (file)
@@ -394,6 +394,8 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN {
     $paymentDate = $this->retrieve('payment_date', 'String', FALSE);
     if (!empty($paymentDate)) {
       $receiveDateTime = new DateTime($paymentDate);
+      $systemTimeZone = new DateTimeZone(date_default_timezone_get());
+      $receiveDateTime->setTimezone($systemTimeZone);
       $input['receive_date'] = $receiveDateTime->format('YmdHis');
     }
   }