wp_exif_date2ts( string $str )
Convert the exif date format to a unix timestamp.
Parameters
- $str
-
(string) (Required) 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.
Source
File: wp-admin/includes/image.php
function wp_exif_date2ts( $str ) { list( $date, $time ) = explode( ' ', trim( $str ) ); list( $y, $m, $d ) = explode( ':', $date ); return strtotime( "{$y}-{$m}-{$d} {$time}" ); }
Expand full source code Collapse full source code View on Trac View on GitHub
Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |