pendulum icon indicating copy to clipboard operation
pendulum copied to clipboard

local_timezone: gracefully handle retrieval errors on Darwin

Open tpwrules opened this issue 2 years ago • 3 comments

In some sandbox environments, the program may not have permission to access /etc/localtime or it may not exist.

Catch any exceptions accessing and parsing its value and return UTC by default to avoid crashing the program.

Pull Request Check List

  • [ ] Added tests for changed code.
  • [ ] Updated documentation for changed code.

tpwrules avatar Jan 06 '24 04:01 tpwrules

CodSpeed Performance Report

Merging #792 will not alter performance

Comparing tpwrules:darwin-error-handling (a4d98ce) with master (3e3fec6)

Summary

✅ 1 untouched benchmarks

codspeed-hq[bot] avatar Jan 09 '24 08:01 codspeed-hq[bot]

Fixed formatting.

tpwrules avatar Jan 09 '24 16:01 tpwrules