1
0
Fork 0

fixed time parsing when the composer.lock file has an old time format

pull/1598/head
Fabien Potencier 2013-02-19 19:42:59 +01:00
parent 5dd5332623
commit ab4e3fbf86
1 changed files with 3 additions and 1 deletions

View File

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