This commit is contained in:
2018-11-22 23:03:48 -06:00
parent 3e90cb1474
commit b6c93c81e0
3 changed files with 20 additions and 1 deletions
+14
View File
@@ -66,6 +66,20 @@ class Esi {
return $character->corporation_name;
}
public function DecodeDate($date) {
//Find the end of the date
$dateEnd = strpos($date, "T");
//Split the string up into date and time
$dateArr = str_split($date, $dateEnd);
//Trim the T and Z from the end of the second item in the array
$dateArr[1] = ltrim($dateArr[1], "T");
$dateArr[1] = rtrim($dateArr[1], "Z");
//Combine the date
$realDate = $dateArr[0] . " " . $dateArr[1];
//Return the combined date in the correct format
return $realDate;
}
}
?>