Get the first zoneinfo directory on TZPATH containing the "UTC" zone.
()
| 40 | |
| 41 | @functools.lru_cache(maxsize=None) |
| 42 | def get_zoneinfo_path() -> pathlib.Path: |
| 43 | """Get the first zoneinfo directory on TZPATH containing the "UTC" zone.""" |
| 44 | key = "UTC" |
| 45 | for path in map(pathlib.Path, zoneinfo.TZPATH): |
| 46 | if (path / key).exists(): |
| 47 | return path |
| 48 | else: |
| 49 | raise OSError("Cannot find time zone data.") |
| 50 | |
| 51 | |
| 52 | def get_zoneinfo_metadata() -> typing.Dict[str, str]: |
no test coverage detected
searching dependent graphs…