Wrong date for files created on SMB external storage

Folders and files synced through the NextCloud client (Mac Sierra) or through the web interface change their “created” and “modified” date to “current date” on the server side (when the destination folder resides on a SMB external storage). Shortly thereafter when the client syncs again, folder dates and random files change on the client to “current date”.

If I copy the file directly to the SAMBA share, the dates are preserved. But when owncloud client syncs, they show up with “current date” on the mac while keeping their original timestamp on the samba server.

Example in photo. Left are on the mac and right are the same folders in samba.

After a while, I get the following error: “This sync would reset the files to an earlier time…etc” . I select Keep Local files but it just keeps popping up.

If I copy a file to a folder that’s not on a samba share (local on the server), I don’t have this problem. All files and folders are copied with original created and modified dates.

System details:
Nextcloud 10.0.0 (although config.php says 10.0.10)
Debian 8.1
Apache 2.4.10
PHP 5.6.27-0+deb8u1
smbclient installed with apt-get
installed php5-smbclient with method described here