Troubles with FTP and modification time
Moderators: Hacker, petermad, Stefan2, white
Troubles with FTP and modification time
When I upload file directly to FTP (keep date - on), then there is one hour less than on local filesystem. When I use synchronization, my local mtime is changed to one hour earlier. I can't find configuration which would work flawlessly. I'm from Czech Republic, locally I'm using CEST timezone. I don't know about FTP server, but I know it's supporting both MLSD and MDTM (so, IIRC it shouldn't modify my local mtime). The file which I am testing with is from 2012-01-06 (Y-M-D).
- sqa_wizard
- Power Member
- Posts: 3893
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
You're right, there's something wrong. It only happens with NewTimeZoneMethod=1 (default on Win7).
Simple test:
Put two files on FTP server and manually set time for both to 02:50 UTC. Use winter date (without DST) for one and summer (with DST) for other:
MFMT 20120106025000 winter.txt -> will show as 03:50 in list -> correct (winter is UTC+1)
MFMT 20120706025000 summer.txt -> will show as 04:50 in list -> correct (summer is UTC+2)
Download the files to local disk -> times stay same -> correct.
Rename or delete the files on server and upload them again from local disk. These are commands used by TC to set their times:
MFMT 20120106015000 winter.txt -> will show as 02:50 in list -> wrong!
MFMT 20120706025000 summer.txt -> will show as 04:50 in list -> correct
Here it happens with both regular copying and synchronization.
Simple test:
Put two files on FTP server and manually set time for both to 02:50 UTC. Use winter date (without DST) for one and summer (with DST) for other:
MFMT 20120106025000 winter.txt -> will show as 03:50 in list -> correct (winter is UTC+1)
MFMT 20120706025000 summer.txt -> will show as 04:50 in list -> correct (summer is UTC+2)
Download the files to local disk -> times stay same -> correct.
Rename or delete the files on server and upload them again from local disk. These are commands used by TC to set their times:
MFMT 20120106015000 winter.txt -> will show as 02:50 in list -> wrong!
MFMT 20120706025000 summer.txt -> will show as 04:50 in list -> correct
Here it happens with both regular copying and synchronization.
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Unfortunately the FTP part knows nothing about NewTimeZoneMethod and uses the old method. I will try to add it, but cannot promise anything yet.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
FTP part knows enough to correctly display times depending on NewTimeZoneMethod. In the example above I set time for both files to 02:50 UTC and they correctly show as 03:50 and 04:50 local time with NewTimeZoneMethod=1. With NewTimeZoneMethod=0 they both show 04:50 (as currently I'm in UTC+2). So this part works correctly.
The only problem is with setting modification time for uploaded file. I read in some other thread that internally you have UTC timestamps for files and you only convert them to local time for display. In that case, there should not be any problem, MFMT also expects UTC, so just take your internal timestamp without any modifications.
The only problem is with setting modification time for uploaded file. I read in some other thread that internally you have UTC timestamps for files and you only convert them to local time for display. In that case, there should not be any problem, MFMT also expects UTC, so just take your internal timestamp without any modifications.
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Could you check in the log whether MFMT sends wrong UTC timestamp?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
OK, since there were no objections, I will move this thread to fixed bugs.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com