Skip to content

Instantly share code, notes, and snippets.

@dflima
Created November 7, 2017 18:41
Show Gist options
  • Save dflima/ac16576e343180f64c80f03a0a1ae5a4 to your computer and use it in GitHub Desktop.
Save dflima/ac16576e343180f64c80f03a0a1ae5a4 to your computer and use it in GitHub Desktop.
<?php
$handle = fopen ("php://stdin", "r");
function timeConversion($s) {
// Complete this function
$dateTime = DateTime::createFromFormat('h:i:sa', $s);
return $dateTime->format('H:i:s');
}
fscanf($handle, "%s",$s);
$result = timeConversion($s);
echo $result . "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment