diff --git a/src/Composer/Package/Loader/ArrayLoader.php b/src/Composer/Package/Loader/ArrayLoader.php index 661013691..f5676705f 100644 --- a/src/Composer/Package/Loader/ArrayLoader.php +++ b/src/Composer/Package/Loader/ArrayLoader.php @@ -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) { }