Get any datetime as UTC, converting if necessary
(&self)
| 215 | |
| 216 | /// Get any datetime as UTC, converting if necessary |
| 217 | pub fn as_datetime_utc(&self) -> Option<DateTime<Utc>> { |
| 218 | match self { |
| 219 | Value::DateTime(dt) => Some(*dt), |
| 220 | Value::DateTimeWithFixedOffset(dt) => Some(dt.with_timezone(&Utc)), |
| 221 | Value::DateTimeWithNamedTz(_, dt) => Some(*dt), |
| 222 | _ => None, |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | /// Get timezone information if available |
| 227 | pub fn get_timezone_info(&self) -> Option<String> { |