[ 
https://issues.apache.org/jira/browse/NET-710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17844233#comment-17844233
 ] 

Sebb commented on NET-710:
--------------------------

I've added a separate branch which tests against the release jars from 3.7 
through to 3.10.0 using windows, ubuntu and macOS.

All succeed.

https://github.com/apache/commons-net/actions/runs/8983633260

We cannot fix something that does not break for us.

> Timestamp parsing fails around the change to daylight savings
> -------------------------------------------------------------
>
>                 Key: NET-710
>                 URL: https://issues.apache.org/jira/browse/NET-710
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.3, 3.8.0
>            Reporter: Mike Baranczak
>            Priority: Major
>
> {{String ts = "Mar 13 02:33";}}
> {{Calendar serverTime = Calendar.getInstance(TimeZone.getTimeZone("EDT"), 
> Locale.US);}}
> {{serverTime.set(2022, 2, 16, 14, 0);}}
> {{Calendar c = new FTPTimestampParserImpl().parseTimestamp(ts, serverTime);}}
>  
> {{Result:}}
>  
> {{java.text.ParseException: Timestamp 'Mar 13 02:33' could not be parsed 
> using a server time of Wed Mar 16 10:00:54 EDT 2022}}
> {{    at 
> org.apache.commons.net.ftp.parser.FTPTimestampParserImpl.parseTimestamp 
> (FTPTimestampParserImpl.java:246)}}
>  
> I can't tell what's going on, but this seems to have something to do with the 
> transition to Daylight Savings Time, which happened on Sunday, March 13. I 
> ran into this bug when trying to get a list of recent files from an FTP 
> server.  (UnixFTPEntryParser ignores the exception silently, which isn't a 
> great idea, either.)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to