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

Method convert_from_utc

graphlite/src/functions/timezone_functions.rs:114–125  ·  view source on GitHub ↗

Convert a UTC datetime to this timezone

(&self, utc_dt: &DateTime<Utc>)

Source from the content-addressed store, hash-verified

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

Callers 1

executeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected