Safeguard against NULL results from gmtime(). Bug #1470