A WordPress-centric search engine for devs and theme authors



wp_exif_date2ts ›

Since2.5.0
Deprecatedn/a
wp_exif_date2ts ( $str )
Parameters:
  • (string) $str
    Required: Yes
Returns:
  • (int)
Defined at:
Codex:

Convert the exif date format to a unix timestamp.



Source

function wp_exif_date2ts( $str ) {
	@list( $date, $time ) = explode( ' ', trim( $str ) );
	@list( $y, $m, $d )   = explode( ':', $date );

	return strtotime( "{$y}-{$m}-{$d} {$time}" );
}