htmllisting-parser icon indicating copy to clipboard operation
htmllisting-parser copied to clipboard

locale issue

Open paapu88 opened this issue 4 years ago • 0 comments

Hei, Just a comment which one might add to documentation. I'm from Finland and reading data from US. So my local is set by Finland.

This leads to problems, because when one reads from USA time.strptime uses Finnish words so when one receives time stamp like "12-May-2015 17:46" It is not recognized because the month is in english and not in finnish.

Solution: before calling htmllistparse.fetch_listing put in your code:

 locale.setlocale(
    locale.LC_ALL, "C"
)  # to get file time formatting right for htmllistparse

And thank's for a wondefull library! Terveisin, Markus

paapu88 avatar Aug 04 '21 08:08 paapu88