From c890d660cd2b2f426c612a2fc3df32e494bbbe94 Mon Sep 17 00:00:00 2001 From: Sergey Shcherbin Date: Thu, 1 Jun 2017 20:48:03 +0300 Subject: [PATCH 1/3] Changed date format to DATE_RFC3399 for packages with git/hg repositories --- src/Composer/Package/Locker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Package/Locker.php b/src/Composer/Package/Locker.php index b11f5a975..93e5ca655 100644 --- a/src/Composer/Package/Locker.php +++ b/src/Composer/Package/Locker.php @@ -432,6 +432,6 @@ class Locker } } - return $datetime ? $datetime->format('Y-m-d H:i:s') : null; + return $datetime ? $datetime->format(DATE_RFC3339) : null; } } From 676156e2db5309290a3b88363a771a5c015ebbf8 Mon Sep 17 00:00:00 2001 From: Sergey Shcherbin Date: Wed, 7 Jun 2017 20:51:59 +0300 Subject: [PATCH 2/3] Changed date time format to RFC_3399 in VcsDriver --- src/Composer/Repository/Vcs/VcsDriver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Repository/Vcs/VcsDriver.php b/src/Composer/Repository/Vcs/VcsDriver.php index 3d7185a34..5227630f6 100644 --- a/src/Composer/Repository/Vcs/VcsDriver.php +++ b/src/Composer/Repository/Vcs/VcsDriver.php @@ -116,7 +116,7 @@ abstract class VcsDriver implements VcsDriverInterface $composer = JsonFile::parseJson($composerFileContent, $identifier . ':composer.json'); if (empty($composer['time']) && $changeDate = $this->getChangeDate($identifier)) { - $composer['time'] = $changeDate->format('Y-m-d H:i:s'); + $composer['time'] = $changeDate->format(DATE_RFC3339); } return $composer; From 292882f0d0e29a7b2f54cf34bdd8344dcb084116 Mon Sep 17 00:00:00 2001 From: Sergey Shcherbin Date: Wed, 7 Jun 2017 22:29:15 +0300 Subject: [PATCH 3/3] Fix for time format in GitBitbucketDriver test --- tests/Composer/Test/Repository/Vcs/GitBitbucketDriverTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Composer/Test/Repository/Vcs/GitBitbucketDriverTest.php b/tests/Composer/Test/Repository/Vcs/GitBitbucketDriverTest.php index afc7354eb..86e362c6f 100644 --- a/tests/Composer/Test/Repository/Vcs/GitBitbucketDriverTest.php +++ b/tests/Composer/Test/Repository/Vcs/GitBitbucketDriverTest.php @@ -183,7 +183,7 @@ class GitBitbucketDriverTest extends TestCase 'require-dev' => array( 'phpunit/phpunit' => '~4.8', ), - 'time' => '2016-05-17 13:19:52', + 'time' => '2016-05-17T13:19:52+00:00', 'support' => array( 'source' => 'https://bitbucket.org/user/repo/src/937992d19d72b5116c3e8c4a04f960e5fa270b22/?at=master', ),