From 9a32c3e5ad2d2f0b7d71ed3434ced31c7da45e1a Mon Sep 17 00:00:00 2001 From: Justin Freeman Date: Thu, 2 Apr 2020 19:56:29 +1100 Subject: [PATCH] CIVICRM-1465 {contribution.receipt_date} token does not use any CiviCRM date formatter, output in YYYY-MM-DD HH:MM:SS format and contribution.receive_date also uses a non-standard format --- CRM/Utils/Token.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CRM/Utils/Token.php b/CRM/Utils/Token.php index d3774f5d68..850a2516ac 100644 --- a/CRM/Utils/Token.php +++ b/CRM/Utils/Token.php @@ -1806,8 +1806,10 @@ class CRM_Utils_Token { break; case 'receive_date': + case 'receipt_date': $value = CRM_Utils_Array::retrieveValueRecursive($contribution, $token); - $value = CRM_Utils_Date::customFormat($value, NULL, ['j', 'm', 'Y']); + $config = CRM_Core_Config::singleton(); + $value = CRM_Utils_Date::customFormat($value, $config->dateformatDatetime); break; default: -- 2.25.1