Skip to content

Commit

Permalink
Merge pull request composer#5753 from alcohol/use-rfc3339-in-arraydumper
Browse files Browse the repository at this point in the history
bring arraydumper in line with json schema spec and packagist
  • Loading branch information
Seldaek committed Oct 12, 2016
2 parents ce2d33d + a45ae5f commit d9328ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Composer/Package/Dumper/ArrayDumper.php
Expand Up @@ -83,7 +83,7 @@ public function dump(PackageInterface $package)
}

if ($package->getReleaseDate()) {
$data['time'] = $package->getReleaseDate()->format('Y-m-d H:i:s');
$data['time'] = $package->getReleaseDate()->format(DATE_RFC3339);
}

$data = $this->dumpValues($package, $keys, $data);
Expand Down
4 changes: 2 additions & 2 deletions tests/Composer/Test/Package/Dumper/ArrayDumperTest.php
Expand Up @@ -104,9 +104,9 @@ public function getKeys()
),
array(
'time',
new \DateTime('2012-02-01'),
$datetime = new \DateTime('2012-02-01'),
'ReleaseDate',
'2012-02-01 00:00:00',
$datetime->format(DATE_RFC3339),
),
array(
'authors',
Expand Down

0 comments on commit d9328ed

Please sign in to comment.