mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Use proper date for steam games
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user