Use proper date for steam games

This commit is contained in:
DariusIII
2017-05-19 11:21:41 +02:00
parent c334019ac3
commit abf66e786a
3 changed files with 6 additions and 9 deletions
+2
View File
@@ -1,3 +1,5 @@
2017-15-19 DariusIII
* Fix: Use proper date for steam games
2017-15-18 DariusIII
* Chg: Update php-giantbomb to version 1.0.2
* Chg: More improvements in pc games matching
+2 -8
View File
@@ -1,15 +1,9 @@
<?php
/**
* Created by PhpStorm.
* User: darius
* Date: 3.2.17.
* Time: 22.25
*/
require_once realpath(dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'bootstrap.php');
require_once dirname(__DIR__, 2) . DIRECTORY_SEPARATOR . 'bootstrap.php';
use nntmux\Steam;
$steam = new Steam();
$steam->populateSteamAppsTable();
$steam->populateSteamAppsTable();
+2 -1
View File
@@ -482,6 +482,7 @@ class Games
if ($steamGameID !== false) {
$this->_gameResults = $this->_getGame->getAll($steamGameID);
if ($this->_gameResults !== false) {
if (empty($this->_gameResults['title'])) {
return false;
@@ -512,7 +513,7 @@ class Games
if (!empty($this->_gameResults['releasedate'])) {
$dateReleased = $this->_gameResults['releasedate'];
$date = \DateTime::createFromFormat('M/j/Y', $dateReleased);
$date = \DateTime::createFromFormat('M j, Y', $dateReleased);
if ($date instanceof \DateTime) {
$game['releasedate'] = (string)$date->format('Y-m-d');
}