One problem that you may be encountering is the fact that $ctime doesn't work with dates before Jan 1 1970. If you could tell me the format that the dates are being stored in, in the ini file, I can write you up a new code that will allow for dates before Jan 1 1970.