src/CFPropertyList/CFDate.php
public static function dateValue($val)
    {
      //2009-05-13T20:23:43Z
        if (!preg_match('/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z/', $val, $matches)) {
            throw new PListException("Unknown date format: $val");
        }
        return gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]);
    }
public static function dateValue($val)
    {
      //2009-05-13T20:23:43Z
        if (!preg_match('/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z/', $val, $matches)) {
            throw new PListException("Unknown date format: $val");
        }
        return gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]);
    }
public static function dateValue ( $ val ) { //2009-05-13T20:23:43Z if ( ! preg_match ( '/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z/' , $ val , $ matches ) ) { throw new PListException ( "Unknown date format: $val" ) ; } return gmmktime ( $ matches [ 4 ] , $ matches [ 5 ] , $ matches [ 6 ] , $ matches [ 2 ] , $ matches [ 3 ] , $ matches [ 1 ] ) ; }
Create a UNIX timestamp from a PList date string
@param string $val The date string (e.g. "2009-05-13T20:23:43Z")
@return integer The UNIX timestamp
@throws PListException when encountering an unknown date string format
Create a UNIX timestamp from a PList date string