You are viewing a plain text version of this content. The canonical link for it is here.
Posted to addressing-dev@ws.apache.org by "Alex Marshall (JIRA)" <ji...@apache.org> on 2007/04/11 00:06:32 UTC
[jira] Commented: (ADDR-23) The timestamp information from the
FTPFile[] does not consistently return the Year correctly for the
directories being pulled.
[ https://issues.apache.org/jira/browse/ADDR-23?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487936 ]
Alex Marshall commented on ADDR-23:
-----------------------------------
Can somebody please look into why this is occurring ? I'm having the same issue:
Environment: Platform:Intel Pentium 4, OS:Windows XP, Java version:1.6.0
> The timestamp information from the FTPFile[] does not consistently return the Year correctly for the directories being pulled.
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: ADDR-23
> URL: https://issues.apache.org/jira/browse/ADDR-23
> Project: Addressing
> Issue Type: Bug
> Environment: Platform:Solaris, OS:Unix, Java version:1.4.2_05-b04
> Reporter: Seshadri Ranganathan
>
> Here is the issue,
> Issue: The timestamp information from the FTPFile[] does not consistently return the Year correctly for the directories being pulled , it returns 2005 instead of 2006.This does not happen all the time, but happens occasionally. I take this timestamp and stamp our local client file(s) and directory.
> Platform: Solaris
> Java version: 1.4.2_05-b04
> Jar : commons-net-1.4.1.jar
> Code list:
> ftp = new FTPClient();
> ftp.connect( server );
> ftp.login( username, password );
> printMe("Connected to " +
> server + ".");
> printMe(ftp.getReplyString());
> // List the files in the directory
> String homeDirectoryPublisher = ftp.printWorkingDirectory();
> printMe("homeDirectoryPublisher="+homeDirectoryPublisher);
> FTPFile[] files = ftp.listFiles();
> printMe( "Number of files in dir: " + files.length );
> DateFormat df = DateFormat.getDateInstance( DateFormat.SHORT );
> for( int i=0; i<files.length; i++ )
> {
> printMe("----------------Start Dataset Processing file="+(i+1));
> Date fileDate = files[ i ].getTimestamp().getTime();
> printMe( df.format( files[ i ].getTimestamp().getTime() ) ); // WRONG DATE PRINTED, instead of YEAR 06 it is printed as 05 ??????????
> printMe( "\t" + files[ i ].getName() );
> printMe( "\t" + fileDate); // WRONG DATE PRINTED, instead of YEAR 2006 it is printed as 2005 ??????????
> printMe( "\t" + "isDirectory=" + files[ i ].isDirectory());
> }
> Thanks,
> Ranga
--
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: addressing-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: addressing-dev-help@ws.apache.org