commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r633380 - /commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
Date Tue, 04 Mar 2008 20:16:38 GMT
On 04/03/2008, rwinston@apache.org <rwinston@apache.org> wrote:
> Author: rwinston
>  Date: Mon Mar  3 23:39:17 2008
>  New Revision: 633380
>
>  URL: http://svn.apache.org/viewvc?rev=633380&view=rev
>  Log:
>  Remove specific isLeapYear() check, to handle other cases (such as Apr 26 02:00 in US/Central
timezone). See NET-188
>

Would be good to remove the import as well.

>  Modified:
>     commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
>
>  Modified: commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
>  URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java?rev=633380&r1=633379&r2=633380&view=diff
>  ==============================================================================
>  --- commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
(original)
>  +++ commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
Mon Mar  3 23:39:17 2008
>  @@ -101,8 +101,7 @@
>                         // e.g. Java's DateFormatter will assume that "Feb 29 12:00"
refers to
>                         // Feb 29 1970 (an invalid date) rather than a potentially valid
leap year date.
>                         // This is pretty bad hack to work around the deficiencies of
the JDK date/time classes.
>  -                       if (recentDateFormat != null &&
>  -                                       new GregorianCalendar().isLeapYear(now.get(Calendar.YEAR)))
{
>  +                       if (recentDateFormat != null) {
>                                 pp = new ParsePosition(0);
>                                 int year = Calendar.getInstance().get(Calendar.YEAR);
>                                 String timeStampStrPlusYear = timestampStr + " " + year;
>
>
>

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


Mime
View raw message