wp_exif_date2ts

Convert the exif date format to a unix timestamp.

Description

(int) wp_exif_date2ts( (string) $str ); 

Returns (int)

Parameters (1)

0. $str (string)
The str.

Usage

  1. if ( !function_exists( 'wp_exif_date2ts' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/image.php'; 
  3.  
  4. // The str. 
  5. $str = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp_exif_date2ts($str); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/image.php  
  1. function wp_exif_date2ts($str) { 
  2. @list( $date, $time ) = explode( ' ', trim($str) ); 
  3. @list( $y, $m, $d ) = explode( ':', $date ); 
  4.  
  5. return strtotime( "{$y}-{$m}-{$d} {$time}" );