wp_exif_date2ts()
Converts the exif date format to a unix timestamp.
Хуков нет.
Возвращает
int|false. The unix timestamp, or false on failure.
Использование
wp_exif_date2ts( $str );
- $str(строка) (обязательный)
- A date string expected to be in Exif format (Y:m:d H:i:s).
Список изменений
| С версии 2.5.0 | Введена. |
Код wp_exif_date2ts() wp exif date2ts WP 6.9.4
function wp_exif_date2ts( $str ) {
list( $date, $time ) = explode( ' ', trim( $str ) );
list( $y, $m, $d ) = explode( ':', $date );
return strtotime( "{$y}-{$m}-{$d} {$time}" );
}