WordPress Version: 6.1
/**
* Converts the exif date format to a unix timestamp.
*
* @since 2.5.0
*
* @param string $str A date string expected to be in Exif format (Y:m:d H:i:s).
* @return int|false The unix timestamp, or false on failure.
*/
function wp_exif_date2ts($str)
{
list($date, $time) = explode(' ', trim($str));
list($y, $m, $d) = explode(':', $date);
return strtotime("{$y}-{$m}-{$d} {$time}");
}