Skip to content

Commit

Permalink
BUGFIX: Fix leading zeros missing in DateConverter (#24)
Browse files Browse the repository at this point in the history
* fix leading zeros missing in DateConverter
* Fix global namespace sprintf
  • Loading branch information
gjwnc authored and daniellienert committed Sep 19, 2019
1 parent 88ab671 commit de1b0b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Converter/DateConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static function convertGpsDateAndTime(string $gpsDateStamp, array $gpsTim
{
return \DateTime::createFromFormat(
'Y:m:d H:i:s',
$gpsDateStamp . ' ' . (int)$gpsTimeStamp[0] . ':' . (int)$gpsTimeStamp[1] . ':' . (int)$gpsTimeStamp[2]
$gpsDateStamp . ' ' . \sprintf('%02d:%02d:%02d', (int)$gpsTimeStamp[0], (int)$gpsTimeStamp[1], (int)$gpsTimeStamp[2])
);
}

Expand Down

0 comments on commit de1b0b9

Please sign in to comment.