pub fn from_name(name: &str) -> Option<Self> {
		use chrono_tz::*;
		#[rustfmt::skip]
		#[allow(non_upper_case_globals)] // https://github.com/rust-lang/rust/issues/25207
		let inner = match name.parse().ok()? {
			UTC | UCT | Universal | Zulu | GMT | GMT0 | GMTMinus0 | GMTPlus0 | Greenwich |
			Etc::UTC | Etc::UCT | Etc::Universal | Etc::Zulu | Etc::GMT | Etc::GMT0 | Etc::GMTMinus0 | Etc::GMTPlus0 | Etc::Greenwich => {
				TimezoneInner::Fixed(0)
			}
			Etc::GMTPlus1 => TimezoneInner::Fixed(-60 * 60),
			Etc::GMTPlus2 => TimezoneInner::Fixed(-2 * 60 * 60),
			Etc::GMTPlus3 => TimezoneInner::Fixed(-3 * 60 * 60),
			Etc::GMTPlus4 => TimezoneInner::Fixed(-4 * 60 * 60),
			Etc::GMTPlus5 => TimezoneInner::Fixed(-5 * 60 * 60),
			Etc::GMTPlus6 => TimezoneInner::Fixed(-6 * 60 * 60),
			Etc::GMTPlus7 => TimezoneInner::Fixed(-7 * 60 * 60),
			Etc::GMTPlus8 => TimezoneInner::Fixed(-8 * 60 * 60),
			Etc::GMTPlus9 => TimezoneInner::Fixed(-9 * 60 * 60),
			Etc::GMTPlus10 => TimezoneInner::Fixed(-10 * 60 * 60),
			Etc::GMTPlus11 => TimezoneInner::Fixed(-11 * 60 * 60),
			Etc::GMTPlus12 => TimezoneInner::Fixed(-12 * 60 * 60),
			Etc::GMTMinus1 => TimezoneInner::Fixed(60 * 60),
			Etc::GMTMinus2 => TimezoneInner::Fixed(2 * 60 * 60),
			Etc::GMTMinus3 => TimezoneInner::Fixed(3 * 60 * 60),
			Etc::GMTMinus4 => TimezoneInner::Fixed(4 * 60 * 60),
			Etc::GMTMinus5 => TimezoneInner::Fixed(5 * 60 * 60),
			Etc::GMTMinus6 => TimezoneInner::Fixed(6 * 60 * 60),
			Etc::GMTMinus7 => TimezoneInner::Fixed(7 * 60 * 60),
			Etc::GMTMinus8 => TimezoneInner::Fixed(8 * 60 * 60),
			Etc::GMTMinus9 => TimezoneInner::Fixed(9 * 60 * 60),
			Etc::GMTMinus10 => TimezoneInner::Fixed(10 * 60 * 60),
			Etc::GMTMinus11 => TimezoneInner::Fixed(11 * 60 * 60),
			Etc::GMTMinus12 => TimezoneInner::Fixed(12 * 60 * 60),
			Etc::GMTMinus13 => TimezoneInner::Fixed(13 * 60 * 60),
			Etc::GMTMinus14 => TimezoneInner::Fixed(14 * 60 * 60),
			tz => TimezoneInner::Variable(tz),
		};
		Some(Self { inner })
	}
/// Create a new Timezone from a name in the [IANA Database](https://www.iana.org/time-zones).
Create a new Timezone from a name in the [IANA Database].
Create a new Timezone from a name in the [ IANA Database ] .
pub fn from_name(name: &str) -> Option<Self> {
		use chrono_tz::*;
		#[rustfmt::skip]
		#[allow(non_upper_case_globals)] // https://github.com/rust-lang/rust/issues/25207
		let inner = match name.parse().ok()? {
			UTC | UCT | Universal | Zulu | GMT | GMT0 | GMTMinus0 | GMTPlus0 | Greenwich |
			Etc::UTC | Etc::UCT | Etc::Universal | Etc::Zulu | Etc::GMT | Etc::GMT0 | Etc::GMTMinus0 | Etc::GMTPlus0 | Etc::Greenwich => {
				TimezoneInner::Fixed(0)
			}
			Etc::GMTPlus1 => TimezoneInner::Fixed(-60 * 60),
			Etc::GMTPlus2 => TimezoneInner::Fixed(-2 * 60 * 60),
			Etc::GMTPlus3 => TimezoneInner::Fixed(-3 * 60 * 60),
			Etc::GMTPlus4 => TimezoneInner::Fixed(-4 * 60 * 60),
			Etc::GMTPlus5 => TimezoneInner::Fixed(-5 * 60 * 60),
			Etc::GMTPlus6 => TimezoneInner::Fixed(-6 * 60 * 60),
			Etc::GMTPlus7 => TimezoneInner::Fixed(-7 * 60 * 60),
			Etc::GMTPlus8 => TimezoneInner::Fixed(-8 * 60 * 60),
			Etc::GMTPlus9 => TimezoneInner::Fixed(-9 * 60 * 60),
			Etc::GMTPlus10 => TimezoneInner::Fixed(-10 * 60 * 60),
			Etc::GMTPlus11 => TimezoneInner::Fixed(-11 * 60 * 60),
			Etc::GMTPlus12 => TimezoneInner::Fixed(-12 * 60 * 60),
			Etc::GMTMinus1 => TimezoneInner::Fixed(60 * 60),
			Etc::GMTMinus2 => TimezoneInner::Fixed(2 * 60 * 60),
			Etc::GMTMinus3 => TimezoneInner::Fixed(3 * 60 * 60),
			Etc::GMTMinus4 => TimezoneInner::Fixed(4 * 60 * 60),
			Etc::GMTMinus5 => TimezoneInner::Fixed(5 * 60 * 60),
			Etc::GMTMinus6 => TimezoneInner::Fixed(6 * 60 * 60),
			Etc::GMTMinus7 => TimezoneInner::Fixed(7 * 60 * 60),
			Etc::GMTMinus8 => TimezoneInner::Fixed(8 * 60 * 60),
			Etc::GMTMinus9 => TimezoneInner::Fixed(9 * 60 * 60),
			Etc::GMTMinus10 => TimezoneInner::Fixed(10 * 60 * 60),
			Etc::GMTMinus11 => TimezoneInner::Fixed(11 * 60 * 60),
			Etc::GMTMinus12 => TimezoneInner::Fixed(12 * 60 * 60),
			Etc::GMTMinus13 => TimezoneInner::Fixed(13 * 60 * 60),
			Etc::GMTMinus14 => TimezoneInner::Fixed(14 * 60 * 60),
			tz => TimezoneInner::Variable(tz),
		};
		Some(Self { inner })
	}
pub fn from_name ( name : & str ) -> Option < Self > { use chrono_tz :: * ; # [ rustfmt :: skip ] # [ allow ( non_upper_case_globals ) ] // https://github.com/rust-lang/rust/issues/25207 let inner = match name . parse ( ) . ok ( ) ? { UTC | UCT | Universal | Zulu | GMT | GMT0 | GMTMinus0 | GMTPlus0 | Greenwich | Etc :: UTC | Etc :: UCT | Etc :: Universal | Etc :: Zulu | Etc :: GMT | Etc :: GMT0 | Etc :: GMTMinus0 | Etc :: GMTPlus0 | Etc :: Greenwich => { TimezoneInner :: Fixed ( 0 ) } Etc :: GMTPlus1 => TimezoneInner :: Fixed ( - 60 * 60 ) , Etc :: GMTPlus2 => TimezoneInner :: Fixed ( - 2 * 60 * 60 ) , Etc :: GMTPlus3 => TimezoneInner :: Fixed ( - 3 * 60 * 60 ) , Etc :: GMTPlus4 => TimezoneInner :: Fixed ( - 4 * 60 * 60 ) , Etc :: GMTPlus5 => TimezoneInner :: Fixed ( - 5 * 60 * 60 ) , Etc :: GMTPlus6 => TimezoneInner :: Fixed ( - 6 * 60 * 60 ) , Etc :: GMTPlus7 => TimezoneInner :: Fixed ( - 7 * 60 * 60 ) , Etc :: GMTPlus8 => TimezoneInner :: Fixed ( - 8 * 60 * 60 ) , Etc :: GMTPlus9 => TimezoneInner :: Fixed ( - 9 * 60 * 60 ) , Etc :: GMTPlus10 => TimezoneInner :: Fixed ( - 10 * 60 * 60 ) , Etc :: GMTPlus11 => TimezoneInner :: Fixed ( - 11 * 60 * 60 ) , Etc :: GMTPlus12 => TimezoneInner :: Fixed ( - 12 * 60 * 60 ) , Etc :: GMTMinus1 => TimezoneInner :: Fixed ( 60 * 60 ) , Etc :: GMTMinus2 => TimezoneInner :: Fixed ( 2 * 60 * 60 ) , Etc :: GMTMinus3 => TimezoneInner :: Fixed ( 3 * 60 * 60 ) , Etc :: GMTMinus4 => TimezoneInner :: Fixed ( 4 * 60 * 60 ) , Etc :: GMTMinus5 => TimezoneInner :: Fixed ( 5 * 60 * 60 ) , Etc :: GMTMinus6 => TimezoneInner :: Fixed ( 6 * 60 * 60 ) , Etc :: GMTMinus7 => TimezoneInner :: Fixed ( 7 * 60 * 60 ) , Etc :: GMTMinus8 => TimezoneInner :: Fixed ( 8 * 60 * 60 ) , Etc :: GMTMinus9 => TimezoneInner :: Fixed ( 9 * 60 * 60 ) , Etc :: GMTMinus10 => TimezoneInner :: Fixed ( 10 * 60 * 60 ) , Etc :: GMTMinus11 => TimezoneInner :: Fixed ( 11 * 60 * 60 ) , Etc :: GMTMinus12 => TimezoneInner :: Fixed ( 12 * 60 * 60 ) , Etc :: GMTMinus13 => TimezoneInner :: Fixed ( 13 * 60 * 60 ) , Etc :: GMTMinus14 => TimezoneInner :: Fixed ( 14 * 60 * 60 ) , tz => TimezoneInner :: Variable ( tz ) , } ; Some ( Self { inner } ) }
Create a new Timezone from a name in the [IANA Database](https://www.iana.org/time-zones).
Create a new Timezone from a name in the [ IANA Database ] ( https : // www . iana . org / time - zones ) .
name
&str