1
0
Fork 0

Change date format when getting log from mercurial

Use rfc3339date format instead of rfc822date to avoid exceptions from
DateTime constructor because of localized dates.

fix #2346
pull/2347/head
Sebastian Schawohl 2013-10-18 16:41:54 +02:00
parent efb41d467e
commit 4198688f54
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ class HgDriver extends VcsDriver
$composer = JsonFile::parseJson($composer, $identifier);
if (!isset($composer['time'])) {
$this->process->execute(sprintf('hg log --template "{date|rfc822date}" -r %s', escapeshellarg($identifier)), $output, $this->repoDir);
$this->process->execute(sprintf('hg log --template "{date|rfc3339date}" -r %s', escapeshellarg($identifier)), $output, $this->repoDir);
$date = new \DateTime(trim($output), new \DateTimeZone('UTC'));
$composer['time'] = $date->format('Y-m-d H:i:s');
}