improved handling of atime

(cherry picked from commit e4cb6689720908eb19772f95cd8cdeeef426d158)