Loading modules/promotion/src/Entity/Promotion.php +1 −1 Changes for modules/promotion/src/Entity/Promotion.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -928,7 +928,7 @@ class Promotion extends CommerceContentEntityBase implements PromotionInterface */ public static function getDefaultStartDate() { $timestamp = \Drupal::time()->getRequestTime(); return gmdate(DateTimeItemInterface::DATETIME_STORAGE_FORMAT, $timestamp); return date(DateTimeItemInterface::DATETIME_STORAGE_FORMAT, $timestamp); } /** Loading modules/promotion/tests/src/Kernel/Entity/CouponTest.php +1 −1 Changes for modules/promotion/tests/src/Kernel/Entity/CouponTest.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ class CouponTest extends OrderKernelTestBase { $date_pattern = DateTimeItemInterface::DATETIME_STORAGE_FORMAT; $time = $this->container->get('datetime.time'); $default_start_date = gmdate($date_pattern, $time->getRequestTime()); $default_start_date = date($date_pattern, $time->getRequestTime()); $this->assertEquals($default_start_date, $coupon->getStartDate()->format($date_pattern)); $coupon->setStartDate(new DrupalDateTime('2017-01-01 12:12:12')); $this->assertEquals('2017-01-01 12:12:12 UTC', $coupon->getStartDate()->format('Y-m-d H:i:s T')); Loading modules/promotion/tests/src/Kernel/Entity/PromotionTest.php +1 −1 Changes for modules/promotion/tests/src/Kernel/Entity/PromotionTest.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -168,7 +168,7 @@ class PromotionTest extends OrderKernelTestBase { $date_pattern = DateTimeItemInterface::DATETIME_STORAGE_FORMAT; $time = $this->container->get('datetime.time'); $default_start_date = gmdate($date_pattern, $time->getRequestTime()); $default_start_date = date($date_pattern, $time->getRequestTime()); $this->assertEquals($default_start_date, $promotion->getStartDate()->format($date_pattern)); $promotion->setStartDate(new DrupalDateTime('2017-01-01 12:12:12')); $this->assertEquals('2017-01-01 12:12:12 UTC', $promotion->getStartDate()->format('Y-m-d H:i:s T')); Loading Loading
modules/promotion/src/Entity/Promotion.php +1 −1 Changes for modules/promotion/src/Entity/Promotion.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -928,7 +928,7 @@ class Promotion extends CommerceContentEntityBase implements PromotionInterface */ public static function getDefaultStartDate() { $timestamp = \Drupal::time()->getRequestTime(); return gmdate(DateTimeItemInterface::DATETIME_STORAGE_FORMAT, $timestamp); return date(DateTimeItemInterface::DATETIME_STORAGE_FORMAT, $timestamp); } /** Loading
modules/promotion/tests/src/Kernel/Entity/CouponTest.php +1 −1 Changes for modules/promotion/tests/src/Kernel/Entity/CouponTest.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ class CouponTest extends OrderKernelTestBase { $date_pattern = DateTimeItemInterface::DATETIME_STORAGE_FORMAT; $time = $this->container->get('datetime.time'); $default_start_date = gmdate($date_pattern, $time->getRequestTime()); $default_start_date = date($date_pattern, $time->getRequestTime()); $this->assertEquals($default_start_date, $coupon->getStartDate()->format($date_pattern)); $coupon->setStartDate(new DrupalDateTime('2017-01-01 12:12:12')); $this->assertEquals('2017-01-01 12:12:12 UTC', $coupon->getStartDate()->format('Y-m-d H:i:s T')); Loading
modules/promotion/tests/src/Kernel/Entity/PromotionTest.php +1 −1 Changes for modules/promotion/tests/src/Kernel/Entity/PromotionTest.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -168,7 +168,7 @@ class PromotionTest extends OrderKernelTestBase { $date_pattern = DateTimeItemInterface::DATETIME_STORAGE_FORMAT; $time = $this->container->get('datetime.time'); $default_start_date = gmdate($date_pattern, $time->getRequestTime()); $default_start_date = date($date_pattern, $time->getRequestTime()); $this->assertEquals($default_start_date, $promotion->getStartDate()->format($date_pattern)); $promotion->setStartDate(new DrupalDateTime('2017-01-01 12:12:12')); $this->assertEquals('2017-01-01 12:12:12 UTC', $promotion->getStartDate()->format('Y-m-d H:i:s T')); Loading