Dear Maintainer, tried to track where the time is set/retrieved for a remote file and came up with this location [1].
I am not sure if flag SSH_FILEXFER_ATTR_ACMODTIME/SSH2_FILEXFER_ATTR_ACMODTIME is the only possible way ssh has to transfer the date, but at least that way seems to just use 32 bits without the nano seconds. Unfortunately the "has no historic wire protocols" might not be completely true because sshfs relies on ssh, which shows a similar limitation also with sftp/scp. Kind regards, Bernhard [1] (rr) bt #0 0x000055c9a06ba46b in buf_get_attrs (buf=0x7f994b5d6b50, stbuf=<optimized out>, flagsp=<optimized out>) at ../sshfs.c:912 #1 0x000055c9a06bfe66 in sshfs_getattr (path=<optimized out>, stbuf=0x7f994b5d6c80, fi=<optimized out>) at ../sshfs.c:3393 #2 0x000055c9a06c184d in cache_getattr (fi=0x0, stbuf=0x7f994b5d6c80, path=0x7f993c000c30 "/.bash_history") at ../cache.c:272 #3 cache_getattr (path=0x7f993c000c30 "/.bash_history", stbuf=0x7f994b5d6c80, fi=0x0) at ../cache.c:266 #4 0x00007f994c67a557 in lookup_path (f=0x55c9a07270e0, nodeid=1, name=0x7f994a9d5038 ".bash_history", path=<optimized out>, e=0x7f994b5d6c70, fi=<optimized out>) at ../lib/fuse.c:2537 #5 0x00007f994c67a66b in fuse_lib_lookup (req=0x7f993c000b60, parent=1, name=<optimized out>) at ../lib/fuse.c:2725 #6 0x00007f994c687a83 in fuse_session_process_buf_int (se=0x55c9a07274b0, buf=buf@entry=0x7f9944000b80, ch=<optimized out>) at ../lib/fuse_lowlevel.c:2666 #7 0x00007f994c683393 in fuse_do_work (data=0x7f9944000b60) at ../lib/fuse_loop_mt.c:163 #8 0x00007f994c655ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477 #9 0x00007f994c456d4f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 866 if ((flags & SSH_FILEXFER_ATTR_ACMODTIME)) { 867 if (buf_get_uint32(buf, &atime) == -1 || 868 buf_get_uint32(buf, &mtime) == -1) ... 912 stbuf->st_ctime = stbuf->st_mtime = mtime; [2] benutzer@debian:~$ touch --date="2260-10-18 00:00:00.123456789" /tmp/future-test-a benutzer@debian:~$ scp -p benutzer@localhost:/tmp/future-test-a /tmp/future-test-c benutzer@localhost's password: future-test-a 100% 0 0.0KB/s 00:00 benutzer@debian:~$ sftp -p benutzer@localhost:/tmp/future-test-a /tmp/future-test-b benutzer@localhost's password: Connected to localhost. Fetching /tmp/future-test-a to /tmp/future-test-b benutzer@debian:~$ ls -lisah --full-time /tmp/future-test* 70 0 -rw-r--r-- 1 benutzer benutzer 0 2260-10-18 00:00:00.123456789 +0200 /tmp/future-test-a 74 0 -rw-r--r-- 1 benutzer benutzer 0 1988-08-04 11:03:28.000000000 +0200 /tmp/future-test-b 73 0 -rw-r--r-- 1 benutzer benutzer 0 2260-10-18 00:00:00.000000000 +0200 /tmp/future-test-c