|
I just entered to submit the same issue. In my opinion, the solution must be to add the year field before the first parse, instead of doing this after successful parsing (which is done now). The reason for this problem is the stupid behaviour of all unix systems, to omit the year, when displaying dates in the "nearest" past (I don't know the limit). Unfortunately even the ftp servers do the same.
It would be very nice, if someone could fix this issue shortly, because we programmed a JobScheduler on base of commons.net, and so at the moment this program is not able to get any file from a directory containing a file from Feb 29 because of the null elements in the FtpFile array (okay, this could be fixed by skipping the nulls, but of course we need also to get the files from this date). Thanks in advance W. Pasche, Sabre Travel Networks I've drilled in and the problem is that the timestamp parsing code depends on SimpleDateFormat with leniency disabled. That does not parse the date e.g., "Feb 29 17:46".
ParsePosition pp = new ParsePosition(0); Yields null. This should probably be a little smarter about how it parsed timestamps. One should append the year to the recent date before parsing with SimpleDateFormat. For instance, Calendar c = Calendar.getInstance(); produces the correct date. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
NET-188.