pub fn parse_time_zone(&self, tz: &str) -> Result<ArcTz, Error> {
        Ok(ArcTz::new(if tz == "UTC" {
            Utc.into()
        } else {
            let path = self.zoneinfo.join(tz);
            let content = fs::read(&path).map_err(|source| Error::Io {
                action: "read time zone file",
                path,
                source,
            })?;
            Tz::parse(tz, &content).map_err(|source| Error::InvalidTimeZone {
                time_zone: tz.to_owned(),
                source,
            })?
        }))
    }
/// Parses the time zone name into a time zone object.
Parses the time zone name into a time zone object.
Parses the time zone name into a time zone object .
pub fn parse_time_zone(&self, tz: &str) -> Result<ArcTz, Error> {
        Ok(ArcTz::new(if tz == "UTC" {
            Utc.into()
        } else {
            let path = self.zoneinfo.join(tz);
            let content = fs::read(&path).map_err(|source| Error::Io {
                action: "read time zone file",
                path,
                source,
            })?;
            Tz::parse(tz, &content).map_err(|source| Error::InvalidTimeZone {
                time_zone: tz.to_owned(),
                source,
            })?
        }))
    }
pub fn parse_time_zone ( & self , tz : & str ) -> Result < ArcTz , Error > { Ok ( ArcTz :: new ( if tz == " " { Utc . into ( ) } else { let path = self . zoneinfo . join ( tz ) ; let content = fs :: read ( & path ) . map_err ( | source | Error :: Io { action : " " , path , source , } ) ? ; Tz :: parse ( tz , & content ) . map_err ( | source | Error :: InvalidTimeZone { time_zone : tz . to_owned ( ) , source , } ) ? } ) ) }
Parses the time zone name into a time zone object.
Parses the time zone name into a time zone object .
&self
tz
&str
&self
tz
&str