Convert a UTC datetime to this timezone
(&self, utc_dt: &DateTime<Utc>)
| 112 | impl TimezoneType { |
| 113 | /// Convert a UTC datetime to this timezone |
| 114 | fn convert_from_utc(&self, utc_dt: &DateTime<Utc>) -> Value { |
| 115 | match self { |
| 116 | TimezoneType::Named(tz) => { |
| 117 | let _tz_dt = utc_dt.with_timezone(tz); |
| 118 | Value::DateTimeWithNamedTz(tz.to_string(), *utc_dt) |
| 119 | } |
| 120 | TimezoneType::Fixed(offset) => { |
| 121 | let offset_dt = utc_dt.with_timezone(offset); |
| 122 | Value::DateTimeWithFixedOffset(offset_dt) |
| 123 | } |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | /// Get timezone name/identifier |
| 128 | fn name(&self) -> String { |