MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / as_datetime_utc

Method as_datetime_utc

graphlite/src/storage/value.rs:217–224  ·  view source on GitHub ↗

Get any datetime as UTC, converting if necessary

(&self)

Source from the content-addressed store, hash-verified

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> {

Callers 1

executeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected