Timezones and file time when FTP uploading

Please report only one bug per message!

Moderators: Stefan2, white, sheep, Hacker

Power Member
Power Member
Posts: 908
Joined: 2005-01-19, 17:33 UTC

Post by *Sob » 2010-04-21, 20:18 UTC

You may also try with SetEnv one more time and after editing the config and before rebooting, run:

Code: Select all

/etc/init.d/ftp.sh reconfig
Some instructions on QNAP wiki (http://wiki.qnap.com) for changing other settings mention this command. It sounds that it should make the changes stay.

User avatar
Site Admin
Site Admin
Posts: 36277
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland

Post by *ghisler(Author) » 2010-04-22, 16:06 UTC

The LIST command uses local time, so you will see a time zone difference if your PC and the NAS don't use the same time zone (or LIST reports incorrect values).

Currently the only way to correct this is "synchronize dirs". You can set a time zone difference there.
Author of Total Commander

Junior Member
Junior Member
Posts: 8
Joined: 2010-04-11, 19:18 UTC
Location: The Netherlands

Post by *rhulsegge » 2010-04-22, 20:37 UTC

I checked PC, notebook, router and NAS: are all set to the same timezone.

I added the SetEnv code again in the proftpd.conf file
Then I opened a connection with putty and entered the reconfig command you suggested.
Putty answered:
Reconfigure FTP dervices:
reconfig ftp success

Then I restarted the QNAP from within the System Administration\Power Management page.

But... the proftpd.config file was overwritten again and the SetEnv line was gone again...

I searched the QNAP folders with SFTP to see if I could find another instance of the proftpd.conf file, but I didn't find anything.

Power Member
Power Member
Posts: 908
Joined: 2005-01-19, 17:33 UTC

Post by *Sob » 2010-04-23, 01:15 UTC

ghisler(Author): The problem here is that it's not consistent, not all times are wrong, only those from DST period are. The file from December has correct time, but file from June has time shifted by an hour. By shifting time in "synchronize dirs" you fix the wrong ones and break the correct ones. But I don't think this can be reliably solved in TC.

rhulsegge: I checked the ftp.sh script and "reconfig" doesn't actually save settings, but makes FTP daemon reload them from config file. So you can use it to check if the change to config did something. Saving settings must be done in some other way. But I'm out of ideas.

Posts: 124
Joined: 2006-04-12, 21:26 UTC

Post by *andres992 » 2011-11-05, 13:09 UTC

I am having the same trouble with my NAS (Smartstor NS2300N), which also uses proftpd.

My timezone is GMT+02:00 in winter. But now, in the winter time, TC shows uploaded files in GMT (e.g. I uploaded file at 14:00 but TC shows 12:00).

When I view the file in Windows Explorer's FTP, the file time is correct (14:00). When I view the file in FileZilla, it also seems that the correct time is shown (14:00). From FileZilla log:

Code: Select all

Command:	LIST
Response:	150 Opening ASCII mode data connection for file list
Response:	226 Transfer complete.
Status:	Calculating timezone offset of server...
Command:	MDTM x.txt
Response:	213 20111105125955
Status:	Timezone offsets: Server: 0 seconds. Local: 7200 seconds. Difference: 7200 seconds.
It does not matter whether I have MLSD on or off in TC. TC still shows 12:00. The NAS I have does not support MLSD — but nevertheless I would like to have correct time for files. Hence it seems that TC is not actually calculating the timezone offset. Could I propose that TC should start calculating "timezone offsets" as several other pieces of FTP software already seem to do?
#68776 Personal Licence

Post Reply