arrow-py / arrow

🏹 Better dates & times for Python
https://arrow.readthedocs.io
Apache License 2.0
8.64k stars 667 forks source link

parser: allow (UTC prefix in TzInfoParser #1099

Closed priv-kweihmann closed 1 year ago

priv-kweihmann commented 2 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

allow (UTC prefix in TzInfoParser

Input like '(UTC+01:00) Amsterdam, Berlin...' couldn't be parsed by the code. Allow (UTC prefixes to the string and also ignore suffixes to the strings, as remainders are not relevant to the further computation. This particular input was the TZ string send by a remote mail server

codecov[bot] commented 2 years ago

Codecov Report

Merging #1099 (8389fdc) into master (4eb070f) will not change coverage. The diff coverage is n/a.

@@            Coverage Diff            @@
##            master     #1099   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines         2325      2325           
  Branches       449       449           
=========================================
  Hits          2325      2325           
Impacted Files Coverage Δ
arrow/parser.py 100.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

priv-kweihmann commented 1 year ago

@anishnya @jadchaar @krisfremen any feedback on this PR?

anishnya commented 1 year ago

Hey @priv-kweihmann, sorry for the delay in looking at this. The changes look good to me and I've approved the PR. Just awaiting confirmation from one @jadchaar, @krisfremen, or @systemcatch here.