Issue with review due date calculations in OJS 2.4.x

Last October our editors noticed aberrant behaviour in the calculation of default deadlines for reviews. We use 2 weeks for the OJS review time policy (i.e. the journal setting numWeeksPerReview=2) and in late October they noticed that the automatically set due date for reviews was only 13 days after reviewer-assignment instead of 14.

The source of the problem is the logic for calculating due dates and occurs in the days leading up to the ‘fall back’ of Daylight Savings Time. When a review time span crosses the DST change, reviewers “lose” one hour of review time which is then truncated to a full day loss of review time by the existing code.

The method SectionEditorAction::getReviewDueDate() contains the following code:

$today = getDate();
$todayTimestamp = mktime(0, 0, 0, $today[‘mon’], $today[‘mday’], $today[‘year’]);

elseif ($numWeeks) {
return date(‘Y-m-d H:i:s’, $todayTimestamp + ($numWeeks * 7 * 24 * 60 * 60));

return date(‘Y-m-d H:i:s’, $todayTimestamp + ($numWeeks * 7 * 24 * 60 * 60));

The current code sets the due date to 00:00:00 (midnight) of the current day plus $numWeeks worth of seconds. For most of the year this works just fine, but when the review period spans the time change, the due date becomes (for us) 11PM thirteen days from now and this is truncated to 00:00:00 by the first three arguments of the mktime call.

I’ve update the two return statements above on our installation to read:

return date(‘Y-m-d H:i:s’, strtotime(’+’.$numWeeks.’ weeks’,$todayTimestamp));

So for us it sets the due date to ‘+2 weeks’ in the strtotime function. I believe this will ensure that reviewers will have the full number of days intended for their review period.

Hi @rkemp,

What specific version are you working with?

Alec Smecher
Public Knowledge Project Team

Hi Alec,
We are using 2.4.3, but I checked the SectionEditorAction class in 2.4.8 to verify if was still the same before posting the observation. I believe the issue is present throughout the 2.4.x line.