wp_exif_date2ts

Advertisement

Summery Summery

Convert the exif date format to a unix timestamp.

Syntax Syntax

wp_exif_date2ts( string $str )

Parameters Parameters

$str

(Required)

Return Return

(int)

Source 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}" );
}

Advertisement

Changelog Changelog

Changelog
Version Description
2.5.0 Introduced.

Advertisement

Leave a Reply