I have a problem with preserving mtime.
This piece of code does not set my mtime. it sets the current time on the remote instead.
I am using the same code as in example https://www.libssh2.org/examples/scp_write.html
Except for the line 166
channel = libssh2_scp_send64(session, scppath, fileinfo.st_mode & 0777, (size_t)fileinfo.st_size, 1505225516l, 1505225516l);