commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukas Vlcek" <lukas.vl...@gmail.com>
Subject Re: [Net] FTPFile.getTimestamp() returns incorrect year
Date Mon, 31 Jul 2006 14:11:22 GMT
Hi,

Let's elaborate this questions a little more. When I do the follwoing
then it works as expected:

#1) ==================
Calendar cal = null;
FTPTimestampParserImpl parser = new FTPTimestampParserImpl();
parser.configure(UnixFTPEntryParser.NUMERIC_DATE_CONFIG);
try {
	cal = parser.parseTimestamp("2006-07-03 22:52");
} catch (Throwable e) {
	fail(e.getMessage());
}
System.out.println(cal.getTime());

Now the question is if this is exactly the same what will happen
behind the scene if I do the following:

#2) ==================
FTPClient client = new
FTPClient();	client.configure(UnixFTPEntryParser.NUMERIC_DATE_CONFIG);
FTPFile[] allFiles = client.listFiles(folder);

Because not the particualr FTPFiles.getTimestamp() would lead to 2005
year instead of 2006. Do I need to perform additional configuration
setting in the second case?

Regards,
Lukas

On 7/31/06, Lukas Vlcek <lukas.vlcek@gmail.com> wrote:
> Hi, this is forwarded from user list. Does anybody know how to solve
> this problem?
> Regards,
> Lukas
>
> ---------- Forwarded message ----------
> Hi,
>
> I found that FTPFile.getTimestamp() returns incorrect year.
> I have a file which was created on 2006-07-28 but getTimestamp()
> method returns 2005-07-28.
> Does anybody know any workaround?
> Is there fixed version available yet?
>
> Thanks,
> Lukas
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message