Re: [BUG] server time zone ignored in some situations
On Sat, Mar 05, 2011 at 05:22:32PM -0800, Chris Moore wrote: This ends up using Ftp::ConvertFtpDate() in ftpclass.cc, which ignores the timezone, instead doing: return mktime_from_utc(tm); This is correct. MDTM command must return GMT time. From the draft-ietf-ftpext-mlst-16.txt: Time values are always represented in UTC (GMT), and in the Gregorian calendar regardless of what calendar may have been in use at the date and time indicated at the location of the server-PI. So the bug is on the server side. -- Alexander.
Re: [BUG] server time zone ignored in some situations
On Wed, Mar 9, 2011 at 1:55 AM, Alexander V. Lukyanov l...@netis.ru wrote: This is correct. MDTM command must return GMT time. From the draft-ietf-ftpext-mlst-16.txt: Time values are always represented in UTC (GMT), and in the Gregorian calendar regardless of what calendar may have been in use at the date and time indicated at the location of the server-PI. So the bug is on the server side. Oh dear. I have no way of fixing the server. A configurable option in the client to specify how far off MDTM output is woud be useful. Chris.
[BUG] server time zone ignored in some situations
I'm using the 'mirror' command to only upload modified files to the FTP server. The server has an EST timezone. Whenever I run the mirror command, all the files I've modified in the last 5 hours are being re-uploaded. It turns out that the timezone is taken into account when parsing the UNIX-format ls output, but then the precision is only 30 seconds and some code in NetAccess.cc decides that since file-date.ts_prec0 can_get_prec_time, we need to get a more precise version of the remote timestamp. This ends up using Ftp::ConvertFtpDate() in ftpclass.cc, which ignores the timezone, instead doing: return mktime_from_utc(tm); It looks like we need some way of taking the timezone into account when convering FTP dates in ftpclass.cc. Replacing the mktime_from_utc() in ftpclass.cc with: return mktime_from_tz(tm, EST); fixes the problem for me, but isn't a particularly general fix... Chris.