Omega359 commented on code in PR #18025:
URL: https://github.com/apache/datafusion/pull/18025#discussion_r2433324044


##########
datafusion/functions/src/datetime/common.rs:
##########
@@ -42,6 +44,167 @@ pub(crate) fn string_to_timestamp_nanos_shim(s: &str) -> 
Result<i64> {
     string_to_timestamp_nanos(s).map_err(|e| e.into())
 }
 
+#[derive(Clone, Copy)]
+enum ConfiguredZone {
+    Named(Tz),
+    Offset(FixedOffset),
+}
+
+#[derive(Clone)]
+pub(crate) struct ConfiguredTimeZone {
+    repr: Arc<str>,
+    zone: ConfiguredZone,
+}
+
+impl ConfiguredTimeZone {
+    pub(crate) fn utc() -> Self {
+        Self {
+            repr: Arc::from("+00:00"),
+            zone: ConfiguredZone::Offset(FixedOffset::east_opt(0).unwrap()),
+        }
+    }
+
+    pub(crate) fn parse(tz: &str) -> Result<Self> {
+        if tz.trim().is_empty() {
+            return Ok(Self::utc());

Review Comment:
   Note that we may want to change this to allow for None - see the start of 
discussion @ 
https://github.com/apache/datafusion/issues/17993#issuecomment-3407219935 and 
https://github.com/apache/datafusion/pull/18017#issuecomment-3407277942



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to