Skip to content

ZCiCal::toUnixDateTime - missing return statement  #11

Description

@tomas-eklund

The ZCiCal::toUnixDateTime() does not return anything.

/**
 * Read date/time in iCal formatted string
 *
 * @param string iCal formated date/time string
 *
 * @return int Unix timestamp
 * @deprecated Use ZDateHelper::toUnixDateTime() instead
 */

function toUnixDateTime($datetime){
	$year = substr($datetime,0,4);
	$month = substr($datetime,4,2);
	$day = substr($datetime,6,2);
	$hour = 0;
	$minute = 0;
	$second = 0;
	if(strlen($datetime) > 8 && $datetime{8} == "T") {
		$hour = substr($datetime,9,2);
		$minute = substr($datetime,11,2);
		$second = substr($datetime,13,2);
	}
	$d1 = mktime($hour, $minute, $second, $month, $day, $year);

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions