diff --git a/src/timestamp.rs b/src/timestamp.rs index 5510114..196ed40 100644 --- a/src/timestamp.rs +++ b/src/timestamp.rs @@ -2428,6 +2428,15 @@ impl core::str::FromStr for Timestamp { } } +impl<'a> core::convert::TryFrom<&'a str> for Timestamp { + type Error = Error; + + #[inline] + fn try_from(string: &str) -> Result { + DEFAULT_DATETIME_PARSER.parse_timestamp(string) + } +} + impl Eq for Timestamp {} impl PartialEq for Timestamp {