Skip to content

Commit

Permalink
No need for COOKIE fix anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
olvlvl committed Aug 24, 2016
1 parent 04276e4 commit f63ebb3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
12 changes: 2 additions & 10 deletions lib/DateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,10 @@ class DateTime extends \DateTimeImmutable implements \JsonSerializable, Addition
use DateTime\Readers;

/*
* The following constants need to be defined because they are only defined by \DateTimeImmutable
* The following constants need to be defined because they are only defined by \DateTime
*/
const ATOM = \DateTime::ATOM;
const COOKIE = \DateTime::COOKIE;
const RSS = \DateTime::RSS;
const ISO8601 = \DateTime::ISO8601;
const RFC822 = \DateTime::RFC822;
Expand All @@ -121,15 +122,6 @@ class DateTime extends \DateTimeImmutable implements \JsonSerializable, Addition
const RFC3339 = \DateTime::RFC3339;
const W3C = \DateTime::W3C;

/**
* We redefine the constant to make sure that the cookie uses a valid pattern.
*
* @see http://grokbase.com/t/php/php-bugs/111xynxd6m/php-bug-bug-53879-new-datetime-createfromformat-fails-to-parse-cookie-expiration-date
*
* @var string
*/
const COOKIE = 'l, d-M-Y H:i:s T';

/**
* Callable used to create localized instances.
*
Expand Down
9 changes: 0 additions & 9 deletions lib/MutableDateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ class MutableDateTime extends \DateTime implements \JsonSerializable, Additional
use DateTime\Shared;
use DateTime\Readers;

/**
* We redefine the constant to make sure that the cookie uses a valid pattern.
*
* @see http://grokbase.com/t/php/php-bugs/111xynxd6m/php-bug-bug-53879-new-datetime-createfromformat-fails-to-parse-cookie-expiration-date
*
* @var string
*/
const COOKIE = 'l, d-M-Y H:i:s T';

/**
* Returns an instance with the current local time and the local time zone.
*
Expand Down

0 comments on commit f63ebb3

Please sign in to comment.