Islandora/islandora_oai — pull request #58 by mark-cooper (2014-09-25 18:31:59+00:00)
Title: Fix offset for objects whose last modified date ends with 0

This is a bit of an edge case, but for example:

When the itql query is run this is returned as:

"object","date"
info:fedora/fedora-system:ContentModel-3.0,2014-06-17T19:39:48.97Z

Therefore the hardcoded -5 length parameter to drupal_substr
(in islandora_oai_get_earliest_datetime) contracts this to:

2014-06-17T19:39:4Z

Which will fail oai validation.

So check to see if the $earliest_datestamp has only two digits
+ Z and use -4 in that case.