Closed jefft closed 8 years ago
Can you check the "code name" value for your congregations. They need to include an HHMM start time, but legacy values may not include this.
Hi Tom,
Thanks, that hint helped me figure out the problem. We have congregation code 'arvo_1600'. Jethro is not parsing the time from this, despite it being legal according to the help text ("An HHMM time must be present within the value (eg ash_0930_late).")
The relevant code is db_objects/service.class.php line 755:
public static function getMeetingDateTime($meetingDate, $meetingTime) {
$dateString = date('Y-m-d', $meetingDate);
if ($meetingTime != NULL && preg_match('/\\d\\d\\d\\d/', $meetingTime)) {
// Time is specified and valid.
$dateString .= ' ' .
substr($meetingTime, 0, 2) .
":" .
substr($meetingTime, 2, 2) . ':00';
}
return strtotime($dateString);
}
The substr
's are too simplistic, as they assume the first 4 characters are always the timestamp, whereas in 'arvo_1600' they're not.
Thanks for investigating, Jeff. Now fixed.
When I log in to Jethro, I see an 'Upcoming Roster Allocations' section with 1 item ("6 Mar, Arvo Roadeez"). I click 'Subscribe' and view the contents of the generated iCal. The DTSTART and DTEND fields are both 1970:
This happens for multiple users in our Jethro, previously on v2.13.1 and now on 2.14.2.