com web/php: Fix EOL dates DateTime constructor bug. $detail['date'] is a Unix timestamp and not a formated date. My mistake.: eol.php
| From: | Sherif Ramadan | Date: | Sat, 23 Nov 2013 01:20:07 +0000 |
| Subject: | com web/php: Fix EOL dates DateTime constructor bug. $detail['date'] is a Unix timestamp and not a formated date. My mistake.: eol.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-17218@lists.php.net to get a copy of this message | ||
Commit: e80825e1c16de218febe4a7351088f04aa52edbe
Author: Sherif Ramadan <googleguy@php.net> Fri, 22 Nov 2013 20:20:07 -0500
Parents: e939201949dda8510105a4d38e01f55e3679fc4e
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=e80825e1c16de218febe4a7351088f04aa52edbe
Log:
Fix EOL dates DateTime constructor bug. $detail['date'] is a Unix timestamp
and not a formated date. My mistake.
Changed paths:
M eol.php
Diff:
diff --git a/eol.php b/eol.php
index 6f0cd49..4d5c744 100644
--- a/eol.php
+++ b/eol.php
@@ -41,7 +41,7 @@ site_header('Unsupported Branches');
foreach ($branches as $branch => $detail) {
try {
$now = new DateTime;
- $then = new DateTime($detail['date']);
+ $then = new DateTime('@'.$detail['date']);
$diff = $now->diff($then);
$times = array();
if ($diff->y) {