Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 64397 invoked from network); 24 Mar 2006 20:01:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Mar 2006 20:01:55 -0000 Received: (qmail 67489 invoked by uid 500); 24 Mar 2006 20:01:49 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 67431 invoked by uid 500); 24 Mar 2006 20:01:49 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 67420 invoked by uid 99); 24 Mar 2006 20:01:49 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Mar 2006 12:01:48 -0800 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=HTML_MESSAGE,NO_REAL_NAME,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of Mahesh.Trikannad@donovandata.com designates 168.238.130.5 as permitted sender) Received: from [168.238.130.5] (HELO dns2.donovandata.com) (168.238.130.5) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Mar 2006 12:01:48 -0800 Received: from mail.donovandata.com (f5-dmz.wan.donovandata.com [168.238.130.220]) by dns2.donovandata.com (8.12.11.20060308/8.12.11) with ESMTP id k2OK1PgK008008 for ; Fri, 24 Mar 2006 15:01:25 -0500 In-Reply-To: <44244B1B.9050808@thelabllc.com> To: "Jakarta Commons Users List" Subject: Re: [Net]Getting timestamp of 2005 instead of 2006 in FTPFile MIME-Version: 1.0 X-Mailer: Lotus Notes Release 6.5.1 January 21, 2004 Message-ID: From: Mahesh.Trikannad@donovandata.com Date: Fri, 24 Mar 2006 15:01:57 -0500 X-MIMETrack: Serialize by Router on SMTP-NY01/USA/DDS(Release 6.5.1|January 21, 2004) at 03/24/2006 03:01:25 PM, Serialize complete at 03/24/2006 03:01:25 PM Content-Type: multipart/alternative; boundary="=_alternative 006E0C8E8525713B_=" X-Scanned-By: MIMEDefang 2.56 on 168.238.130.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --=_alternative 006E0C8E8525713B_= Content-Type: text/plain; charset="US-ASCII" Hi Derick, Sorry, I think my question was NOT correctly sequenced , so it was misleading. I connect to that box using FTPCLient,upload a file and do a listFiles. I search FTPFile[] for the file I uploaded and print the timestamp. Here is the code, I have added the upload operation too // UPLOAD FileInputStream in = new FileInputStream(localFile); boolean result = storeFile(serverFile, in); in.close(); // UPLOAD DONE // LIST FILES AND PRINT TIMESTAMP OF THE ONE IAM INTERESTED IN FTPFile[] files = listFiles(); > for (int i = 0; i < files.length; i++) { > { retCal = files[i].getTimestamp(); > > System.out.println("YEAR IN TSTAMP:"+tStamp.get(Calendar.YEAR)); And the System.out shows me 2005. Everything else is correct on the timestamp. Regards Mahesh Derick Fernando 03/24/2006 02:40 PM Please respond to "Jakarta Commons Users List" To Jakarta Commons Users List cc Subject Re: [Net]Getting timestamp of 2005 instead of 2006 in FTPFile Hello, The FTP protocol does not support setting timestamps on remote machines, so the 2006 timestamp is created when the file is created on the remote machine. Mahesh.Trikannad@donovandata.com wrote: > Hi, > > I use the FTPClient of the commons net library. I do listFiles and get > the timestamp of the file iam interested in. The timestamp shows 2005. > The file is uploaded to a linux box and it shows 2006 ( I used the approp > option in ls ). > > Here is the relevant code -- > > FTPFile[] files = listFiles(); > for (int i = 0; i < files.length; i++) { > retCal = files[i].getTimestamp(); > > > > System.out.println("YEAR IN TSTAMP:"+tStamp.get(Calendar.YEAR)); > > > Am I missing something > > Thanks > > Mahesh > > __________ NOD32 1.1275 (20051103) Information __________ > > This message was checked by NOD32 antivirus system. > http://www.eset.com > > -- ......................................... Derick Fernando Lead Architect derickf@thelabllc.com (323) 314-9593 http://www.thelabllc.com Content is for intended recipient only. Copyright 2001-2005, The Lab, LLC --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org --=_alternative 006E0C8E8525713B_=--