Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Parser: better year parsing on *NIX lists #72
When getting a *NIX-like list, the library is using the local machine's current year to guess the modification date of a directory/file which can be wrong.
Even though FTP's lists are a mess, most of them seem to be using the ls behavior:
Because of the lack of timezone support in the FTP standards, it's not always possible to guess the right year, but it's possible to improve the guess.
This patch wasn't fully tested.
I've put lots of comments (because I needed them - dealing with dates + timezones can get complicated), feel free to get rid of them.