Converts the exif date format to a unix timestamp.
Parameters
$str
stringrequired- A date string expected to be in Exif format (Y:m:d H:i:s).
Source
function wp_exif_date2ts( $str ) {
list( $date, $time ) = explode( ' ', trim( $str ) );
list( $y, $m, $d ) = explode( ':', $date );
return strtotime( "{$y}-{$m}-{$d} {$time}" );
}
Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.