Skip to content
Permalink
Browse files

Available and expire date time handling corrected.

  • Loading branch information...
mfendek committed Mar 23, 2019
1 parent ab2ef5e commit 7f754b9d1d436a814959df93a2efe20958c0319f
Showing with 3 additions and 3 deletions.
  1. +3 −3 index.php
@@ -46,7 +46,7 @@ function openDataFile($sourcePath, $filePath, $url = '', array &$files = [])
error_reporting(-1);
ini_set('error_log', 'logs/oobgdw-error-' . strftime('%Y%m%d') . '.log');
$version = '2019-03-11';
$version = '2019-03-23';
// configuration
$dataPath = 'src/game_data/Data/';
@@ -483,13 +483,13 @@ function openDataFile($sourcePath, $filePath, $url = '', array &$files = [])
$filterFactions = array_unique($filterFactions);
$available = DateTime::createFromFormat('j/n/Y', $line[16]);
$available = DateTime::createFromFormat('j/n/Y', trim($line[16]));
$available = ($available) ? $available->format('U') : '';
if ($available !== '' && ($filterAvailable === '' || $filterAvailable > $available)) {
$filterAvailable = $available;
}
$expire = DateTime::createFromFormat('j/n/Y', $line[17]);
$expire = DateTime::createFromFormat('j/n/Y', trim($line[17]));
$expire = ($expire) ? $expire->format('U') : '';
if ($expire !== '' && ($filterExpire === '' || $filterExpire < $expire)) {
$filterExpire = $expire;

0 comments on commit 7f754b9

Please sign in to comment.
You can’t perform that action at this time.