1
0
Fork 0

Merge pull request #1598 from fabpot/package-time-fix

fixed time parsing when the composer.lock file has an old time format
pull/1600/merge
Jordi Boggiano 2013-02-20 01:01:38 -08:00
commit b7cd971b06
1 changed files with 3 additions and 1 deletions

View File

@ -135,8 +135,10 @@ class ArrayLoader implements LoaderInterface
} }
if (!empty($config['time'])) { if (!empty($config['time'])) {
$time = ctype_digit($config['time']) ? '@'.$config['time'] : $config['time'];
try { try {
$date = new \DateTime($config['time'], new \DateTimeZone('UTC')); $date = new \DateTime($time, new \DateTimeZone('UTC'));
$package->setReleaseDate($date); $package->setReleaseDate($date);
} catch (\Exception $e) { } catch (\Exception $e) {
} }