What's new

Router changes file modification time for some files

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Thorton

Regular Contributor
AC86U (but I also have the same problem with AC87U). Using USB drive attached to router to store files. After I copy files to router via FTP, everything is OK except for files that were modified in late evening (like several minutes before/after midnight).

For example, if file was modified on 2018-08-26 00:48, router displays its modification date like 2018-08-25, which causes many problems with file sync software because files on router are marked as older, syncing software copies "new" files from computer, router changes modification date again, and the endless story goes on...

Here's the screen - https://i.postimg.cc/J0TFgvGs/asus-files.png

Left is computer, right is router. Notice that only files modified around midnight display incorrect modification time on router, while all other files have exactly the same timestamps on both computer and router. Time on the router seems to be correct - using "date" command it outputs exactly the same date/time as my PC does.

Any suggestions?
 
Will be something to do with DST I expect.

What is the output of date? And what is your PC time/time zone?


Sent from my iPhone using Tapatalk
 
Code:
/tmp/home/root# date
Tue Jul 16 11:47:54 EEST 2019

My PC displays the same date/time. Timezone on PC is GMT+2, timezone on router is GMT+2 as well. DST on PC is enabled and is in effect now.

P.S. "Enable local NTP server" is disabled on router, but I guess it's not relate to the issue because it's only relevant if I want local clients to sync time from router, right?
 
I think @JDB is probably correct and it's a time zone or DST issue. Your picture on right only shows the date but not the time. I suspect that if you could see the time you would find that all the files had the same time offset.

What method are you using to view the files with the incorrect time, SMB, FTP, SCP, etc.?
 
Yes, I was aware of such option, but I just thought the router should report the same date/time as PC when file is copied directly from the PC. Especially because both PC and router have the same timezone and use the same file system (ext4). Oh well, will live with this workaround...
 
Unfortunately, that didn't work. The most strange thing to me is that such files cause no problems when I sync them between PC and disks attached to the PC, but if disk is attached to router, files modified around midnight always cause problems.
 
I think the problem stems from the fact that there is no accepted standard for ftp that allows for setting the timestamp or dealing with time zones/DST.

For example, if I look at the files on my router's USB drive using SSH they are corrected adjusted for TZ/DST by the terminal session. If I look at the same files using Filezilla they are 1 hour ahead (actually in the future!). But, if I look at the same files using Windows command prompt ftp the timestamps are correctly adjusted and displayed.

However, if I set use_localtime=NO the times are displayed correctly in Filezilla but are 1 hour in the past (i.e. not adjusted for TZ/DST) in Windows ftp!

Much easier to use rsync. ;)
 
Last edited:

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top