Utilize getTimeZoneString() method
authorSeamus Lee <seamuslee001@gmail.com>
Sat, 12 Jan 2019 22:41:43 +0000 (17:41 -0500)
committerJason Gillman Jr <jgillman@miopencarry.org>
Mon, 14 Jan 2019 19:56:30 +0000 (14:56 -0500)
Co-Authored-By: jgillmanjr <jason@rrfaae.com>
CRM/Core/Payment/PayPalIPN.php

index 3784a1cfdb4c38c81a3b6be9a5b977e9e34757d6..4248d1c848654f5225d9adbe0b5d62899284bdc8 100644 (file)
@@ -394,7 +394,7 @@ 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());
+      $systemTimeZone = new DateTimeZone(CRM_Core_Config::singleton()->userSystem->getTimeZoneString());
       $receiveDateTime->setTimezone($systemTimeZone);
       $input['receive_date'] = $receiveDateTime->format('YmdHis');
     }