From 03b261ea0fb1f924b58464f5fb1e5583b3feb6a2 Mon Sep 17 00:00:00 2001
From: okarpenko <okarpenko@ebay.com>
Date: Mon, 30 Mar 2015 13:46:41 +0300
Subject: [PATCH] MAGETWO-35583:
 Magento\Payment\Test\Unit\Block\Info\CcTest::testGetCcExpDate failed

---
 app/code/Magento/Payment/Block/Info/Cc.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/app/code/Magento/Payment/Block/Info/Cc.php b/app/code/Magento/Payment/Block/Info/Cc.php
index bd92161c868..6da308168f0 100644
--- a/app/code/Magento/Payment/Block/Info/Cc.php
+++ b/app/code/Magento/Payment/Block/Info/Cc.php
@@ -78,7 +78,11 @@ class Cc extends \Magento\Payment\Block\Info
     public function getCcExpDate()
     {
         $date = new \DateTime('now', new \DateTimeZone($this->_localeDate->getConfigTimezone()));
-        $date->setDate($this->getInfo()->getCcExpYear(), $this->getInfo()->getCcExpMonth(), $date->format('d'));
+        $date->setDate(
+            $this->getInfo()->getCcExpYear(),
+            $this->getInfo()->getCcExpMonth(),
+            $date->modify('first day of')->format('d')
+        );
         return $date;
     }
 
-- 
GitLab