.cargo/vendor/iana-time-zone/src/tz_freebsd.rs
raw| 1 | pub(crate) fn get_timezone_inner() -> Result<String, crate::GetTimezoneError> { |
| 2 | // see https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/19 |
| 3 | let mut contents = std::fs::read_to_string("/var/db/zoneinfo")?; |
| 4 | // Trim to the correct length without allocating. |
| 5 | contents.truncate(contents.trim_end().len()); |
| 6 | Ok(contents) |
| 7 | } |