Improve error handling for gmtime() and localtime()
Many places in the code do not check for gmtime() and localtime() returning NULL. We need to create wrappers or add appropriate error handling in the code.
Also, the is_from() code uses sscanf() to grab the year, and perhaps should be changed to use mutt_atoi() instead. This would require changing mutt_atoi() to allow trailing characters (with a retval of 1 - see mutt_atoui()) and the callers retval checking. Currently the callers fail on trailing chars; to preserve that we would want to check for != 0 instead of < 0. is_from() could check for < 0.