[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-dev
Subject: Re: [Net] FTPFile.getTimestamp() returns incorrect year
From: "Lukas Vlcek" <lukas.vlcek () gmail ! com>
Date: 2006-07-31 14:11:22
Message-ID: 52c3ddca0607310711j17ce57a4w91a5e5fa9810cb4 () mail ! gmail ! com
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic