arrow-py / arrow

๐Ÿน Better dates & times for Python
https://arrow.readthedocs.io
Apache License 2.0
8.71k stars 673 forks source link

Try to fix issue331 #964

Closed lyl1999 closed 3 years ago

lyl1999 commented 3 years ago

Pull Request Checklist

Thank you for taking the time to improve Arrow! Before submitting your pull request, please check all appropriate boxes:

If you have any questions about your code changes or any of the points above, please submit your questions along with the pull request and we will try our best to help!

Description of Changes

Try to fix issue 331, adding a function to set default locale

jadchaar commented 3 years ago

Hi @lyl1999, the solution to 331 needs to be a bit more robust. It needs to set the default locale on the module level so that every single call to an arrow function uses that locale (e.g. parsing, humanize, formatting). If you'd like to take this on, feel free to re-open this PR and attempt the more robust solution I describe above.