tisonkun commented on code in PR #634:
URL: https://github.com/apache/opendal-reqsign/pull/634#discussion_r2377730299
##########
core/src/time.rs:
##########
@@ -105,21 +63,30 @@ pub fn format_rfc3339(t: DateTime) -> String {
/// - `2022-03-01T08:12:34+00:00`
/// - `2022-03-01T08:12:34.00+00:00`
pub fn parse_rfc3339(s: &str) -> crate::Result<DateTime> {
- Ok(chrono::DateTime::parse_from_rfc3339(s)
- .map_err(|err| {
- Error::unexpected(format!("parse '{s}' into rfc3339
failed")).with_source(err)
- })?
- .with_timezone(&Utc))
+ FromStr::from_str(s).map_err(|err| {
Review Comment:
Both work. Let me update this.
--
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]