Meetup location:
Used Dow value of %s from %s
', $meetup['lat']['DDD'], $meetup['lon']['DDD'], $meetup['lat']['DMM'], $meetup['lon']['DMM'], $meetup['lat']['DMS'], $meetup['lon']['DMS'], $interactiveMapURL, $staticMapURL, $dow, $dowDate['string']); debugComment('Feed item text', $text); printf($feedBody, htmlspecialchars($lat['ID']), htmlspecialchars($lon['ID']), htmlspecialchars($localDate['string']), htmlspecialchars($publishDate), htmlspecialchars($text)); } function writeFeedFoot() { global $feedFoot; echo $feedFoot; } // gather requirements $lat = getCoord('lat', $LATITUDE); $lon = getCoord('lon', $LONGITUDE); // initial calculations $is30WRule = ($lon['full'] > -30); $hoursOffset = $lon['full'] * 24 / 360; $secondsOffset = $hoursOffset * 3600; debugComment('is30WRule', $is30WRule); debugComment('timeOffset', $hoursOffset); $genTime = time(); $localTime = $genTime + $secondsOffset; $localDate = getDateFormatted($localTime); $dowDate = calcDowDate($localTime, $is30WRule, $localDate); debugComment('Local date', $localDate); debugComment('DOW date', $dowDate); // retrieve data $dow = grabDOW($dowDate); // compute publishing date $dowUTC = strtotime("{$dowDate['string']}T09:30-04:30"); $midnightUTC = strtotime("{$localDate['string']}T00:00Z") - $secondsOffset; if($debug) { $dowDateUTC = date('r', $dowUTC); $midnightDateUTC = date('r', $midnightUTC); debugComment('DOW UTC', $dowDateUTC); debugComment('Midnight UTC', $midnightDateUTC); } $publishTimeUTC = max($dowUTC, $midnightUTC); $publishDate = date('r', $publishTimeUTC); // output feed writeFeedHead(); writeFeedBody(); writeFeedFoot(); ?>