wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_exif_date2ts › WordPress Function

Od2.5.0
Przestarzałyn/a
wp_exif_date2ts ( $str )
Parametry:
  • (string) $str A date string expected to be in Exif format (Y:m:d H:i:s).
    Wymagane: Tak
Powrót:
  • (int|false) The unix timestamp, or false on failure.
Zdefiniowane na:
Codex:

Converts the exif date format to a unix timestamp.



Źródło

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

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