+ if (chmod_modes && !S_ISLNK(mode) && mode)
+ mode = tweak_mode(mode, chmod_modes);
+@@ -979,6 +999,8 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+ F_GROUP(file) = gid;
+ file->flags |= gid_flags;
+ }
++ if (atimes_ndx)
++ f_atime_set(file, (time_t)atime);
+ if (unsort_ndx)
+ F_NDX(file) = flist->used + flist->ndx_start;
+
+@@ -1374,6 +1396,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+ F_OWNER(file) = st.st_uid;
+ if (gid_ndx) /* Check gid_ndx instead of preserve_gid for del support */
+ F_GROUP(file) = st.st_gid;
++ if (atimes_ndx)
++ f_atime_set(file, st.st_atime);
+
+ if (basename != thisname)
+ file->dirname = lastdir;
+diff --git a/generator.c b/generator.c
+--- a/generator.c
++++ b/generator.c
+@@ -455,6 +455,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+ : iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE) && !(iflags & ITEM_MATCHED)
+ && (!(iflags & ITEM_XNAME_FOLLOWS) || *xname))
+ iflags |= ITEM_REPORT_TIME;
++ if (atimes_ndx && !S_ISDIR(file->mode) && !S_ISLNK(file->mode)
++ && cmp_time(f_atime(file), sxp->st.st_atime) != 0)
++ iflags |= ITEM_REPORT_ATIME;
+ #if !defined HAVE_LCHMOD && !defined HAVE_SETATTRLIST
+ if (S_ISLNK(file->mode)) {
+ ;
+@@ -825,6 +828,8 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
+ if (link_dest) {
+ if (!hard_link_one(file, fname, cmpbuf, 1))
+ goto try_a_copy;
++ if (atimes_ndx)
++ set_file_attrs(fname, file, sxp, NULL, 0);
+ if (preserve_hard_links && F_IS_HLINKED(file))
+ finish_hard_link(file, fname, ndx, &sxp->st, itemizing, code, j);
+ if (!maybe_ATTRS_REPORT && (INFO_GTE(NAME, 2) || stdout_format_has_i > 1)) {
+@@ -1017,6 +1022,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
+ static void list_file_entry(struct file_struct *f)
+ {
+ char permbuf[PERMSTRING_SIZE];
++ time_t atime = atimes_ndx ? f_atime(f) : 0;
+ int64 len;
+ int colwidth = human_readable ? 14 : 11;