[ https://issues.apache.org/jira/browse/NET-159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500796 ]
Divyesh Patel commented on NET-159: ----------------------------------- Hi Julien, Thank you for your early response. The ftp server I am dealing with is not in my control; I have asked for more information on it. I do get a note in the startup message that they are using "X2 WS_FTP Server 5.0.5 (3295908506)". I downloaded an evaluation copy of the "WS FTP" server and was able to reproduce the year problem on my local network. I did not change any configuration on the FTP server (left the default installation configuration set by WS FTP). So the answer to your second question about specifying a Date format in a FTPConfig would be "No". I installed WS FTP on a server with a FAT32 disk; running Windows 2000 SP4. The dir listing on the server does not return the year information for files created in the current year: And being on the local network, the server and JVM are in the same timezone. However, it appears that the FTP server is reporting the UT time, which is ahead of the local time by 6 hrs. For debugging, I played around with the time on the server and touching the test file - and indeed the year is reported as the previous year if the time on the file timestamp is in the future compared to time of the client computer. Enabling the option to list file time in local time helped the issue. So did setting the timezoneid for the FTP server that is not under my control. However, this does mean that the year would be off by one if the Server time is ahead of the actual time by a few minutes. Isn't it possible to assume that the year on the file is the current year (based on the timezone of the server - so the year is not skewed around new year's or for recent files) at the server location; if the year is not included in the listing? For now, my issue is resolved, so thank you very much for your help. Please let me know if you need more information. thanks, Divyesh > FTPFile.getTimestamp() is off by one year > ----------------------------------------- > > Key: NET-159 > URL: https://issues.apache.org/jira/browse/NET-159 > Project: Commons Net > Issue Type: Bug > Affects Versions: 1.4 > Environment: winxp, jdk 1.5 > Reporter: dangerOp > Priority: Minor > > The Calendar object returned by FTPFile.getTimestamp seems to be short by one > year. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]