--- a/restore/tape.c
+++ b/restore/tape.c
@@ -900,6 +900,15 @@ extractfile(struct entry *ep, int doremo
 		uid_t luid = curfile.dip->di_uid;
 		gid_t lgid = curfile.dip->di_gid;
 #endif
+#ifdef HAVE_UTIMENSAT
+		struct timespec times[2];
+
+		times[0].tv_sec  =  timep[0].tv_sec;
+		times[0].tv_nsec =  timep[0].tv_usec*1000;
+		times[1].tv_sec  =  timep[1].tv_sec;
+		times[1].tv_nsec =  timep[1].tv_usec*1000;
+#endif
+
 		if (! (spcl.c_flags & DR_METAONLY)) {
 			lnkbuf[0] = '\0';
 			pathlen = 0;
@@ -919,6 +928,10 @@ extractfile(struct entry *ep, int doremo
 		if (lchown(name, luid, lgid) < 0)
 			warn("%s: lchown", name);
 #endif
+#ifdef HAVE_UTIMENSAT
+		if (utimensat(AT_FDCWD, name, times, AT_SYMLINK_NOFOLLOW) < 0)
+			 warn("%s: file timestamp update failed", name);
+#endif
 		extractattr(name);
 		return (GOOD);
 	}
--- a/configure.ac
+++ b/configure.ac
@@ -421,7 +421,7 @@ AC_SUBST(SQLITE3)
 dnl
 dnl Check for library functions
 dnl
-AC_CHECK_FUNCS(err errx verr verrx vwarn vwarnx warn warnx realpath lchown)
+AC_CHECK_FUNCS(err errx verr verrx vwarn vwarnx warn warnx realpath lchown utimensat)
 AC_CHECK_FUNC(glob)
 
 dnl
