public static function OLE2LocalDate($string)
	{
		if (strlen($string) != 8) {
			return new PEAR_Error("Expecting 8 byte string");
		}

		// factor used for separating numbers into 4 bytes parts
		$factor = pow(2,32);
		list(, $high_part) = unpack('V', substr($string, 4, 4));
		list(, $low_part) = unpack('V', substr($string, 0, 4));

		$big_date = ($high_part * $factor) + $low_part;
		// translate to seconds
		$big_date /= 10000000;

		// days from 1-1-1601 until the beggining of UNIX era
		$days = 134774;

		// translate to seconds from beggining of UNIX era
		$big_date -= $days * 24 * 3600;
		return floor($big_date);
	}