You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by pappu prasad <pp...@gmail.com> on 2014/11/30 19:52:01 UTC

Fwd: [net] mismatch between timestamp and timezone

Hi,

I am Using FTPClient.java, FTPFile.java,FTPListParseEngine.java from
commons-net-3.2.jar to access the files on the ftp server(Linux machine)
located in EET timezone. After accessing the files if I try to see the time
zone and time stamp of the file,timestamp is shown in UTC format but
timezone is shown as timezone of the place where file is being accessed .

Expected was that both should have been in EET format.

Example:
Suppose a file sample.txt on FTP server (in EET zone) is created at
11/27/2014 8:28:20 AM.

While accessing the file(in EET time zone) using jar mentioned above
,FTPFile.java's getTimestamp method will return time as 11/27/2014 6:28:20
AM EET.

Instead it should have been 11/27/2014 8:28:20 AM EET.

Please help me to resolve this issue.

Thanks & Regards,

Pappu

Re: [net] mismatch between timestamp and timezone

Posted by sebb <se...@gmail.com>.
On 30 November 2014 at 18:52, pappu prasad <pp...@gmail.com> wrote:
> Hi,
>
> I am Using FTPClient.java, FTPFile.java,FTPListParseEngine.java from
> commons-net-3.2.jar to access the files on the ftp server(Linux machine)
> located in EET timezone. After accessing the files if I try to see the time
> zone and time stamp of the file,timestamp is shown in UTC format but
> timezone is shown as timezone of the place where file is being accessed .
>
> Expected was that both should have been in EET format.
>
> Example:
> Suppose a file sample.txt on FTP server (in EET zone) is created at
> 11/27/2014 8:28:20 AM.
>
> While accessing the file(in EET time zone) using jar mentioned above
> ,FTPFile.java's getTimestamp method will return time as 11/27/2014 6:28:20
> AM EET.
>
> Instead it should have been 11/27/2014 8:28:20 AM EET.
>
> Please help me to resolve this issue.

The Javadoc

http://commons.apache.org/proper/commons-net/javadocs/api-3.3/org/apache/commons/net/ftp/FTPClient.html

says:

For examples of using FTPClient on servers whose directory listings

use languages other than English
use date formats other than the American English "standard" MM d yyyy
are in different timezones and you need accurate timestamps for
dependency checking as in Ant

see FTPClientConfig.

> Thanks & Regards,
>
> Pappu

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