convert unix timestamp to hours and minutes php code example Example: php unix timestamp to date $currentTime = DateTime::createFromFormat( 'U', $timestamp );