diff --git a/TLE/Parser.php b/TLE/Parser.php index c2758fd..8eed356 100644 --- a/TLE/Parser.php +++ b/TLE/Parser.php @@ -275,12 +275,13 @@ class Parser * Class Constructor. * * @param $tleString string TLE Data. + * @param $dateTime array DateTime array as result from getdate() function. * * @throws \Exception */ - public function __construct($tleString) { + public function __construct($tleString, $dateTime = null) { $this->dateTimeZone = new \DateTimeZone('UTC'); - $this->currentDateTime = getdate(); + $this->currentDateTime = ($dateTime == null) ? getdate() : $dateTime; $lines = explode("\n", $tleString); diff --git a/examples.php b/examples.php index 0d369a4..fcbce18 100644 --- a/examples.php +++ b/examples.php @@ -45,6 +45,7 @@ 2 25544 51.6451 186.7036 0008612 107.8141 252.3953 15.55144393 13625'; foreach($tleData as $tle) { + echo "
"; print_r($tle); echo "
"; $parser = new Parser($tle);