diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index fa62635ea..8d264bdb2 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -790,11 +790,16 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ /** * Check if the document has expired * + * The method expects to database field 'expired' to hold the timestamp + * of the start of day at which end the document expires. The document will + * expire if that day is over. Hence, a document will *not* + * be expired during the day of expiration but at the end of that day + * * @return boolean true if document has expired otherwise false */ function hasExpired() { /* {{{ */ if (intval($this->_expires) == 0) return false; - if (time()>$this->_expires+24*60*60) return true; + if (time()>=$this->_expires+24*60*60) return true; return false; } /* }}} */