nuno-faria commented on PR #21103:
URL: https://github.com/apache/datafusion/pull/21103#issuecomment-4137545691

   > > `dt.to_string()`
   > 
   > @nuno-faria - that is a great point, I think we should be using 
`dt.to_rfc3339()` by default, which should resolve DuckDB and BigQuery issues 
as well so we even don't need custom overrides for them. WDYT?
   > 
   > ```
   > /// Returns an RFC 3339 and ISO 8601 date and time string such as 
`1996-12-19T16:39:57-08:00`.
   >     #[cfg(feature = "alloc")]
   >     #[must_use]
   >     pub fn to_rfc3339(&self) -> String {
   >         // For some reason a string with a capacity less than 32 is ca 20% 
slower when benchmarking.
   >         let mut result = String::with_capacity(32);
   >         let naive = self.overflowing_naive_local();
   >         let offset = self.offset.fix();
   >         write_rfc3339(&mut result, naive, offset, SecondsFormat::AutoSi, 
false)
   >             .expect("writing rfc3339 datetime to string should never 
fail");
   >         result
   >     }
   > ```
   
   Sounds good to me. Should we do on this PR or leave as a follow up?


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