From 34b96fb53cfa57a4c41263b6f4fee2ef52c08a54 Mon Sep 17 00:00:00 2001 From: kyoto7250 <50972773+kyoto7250@users.noreply.github.com> Date: Mon, 22 Aug 2022 22:35:19 +0900 Subject: [PATCH] change parse format --- src/value.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/value.rs b/src/value.rs index 38cd18f80..f1b3541f1 100644 --- a/src/value.rs +++ b/src/value.rs @@ -432,12 +432,11 @@ pub mod time_format { pub static FORMAT_DATE: &[FormatItem<'static>] = format_description!("[year]-[month]-[day]"); pub static FORMAT_TIME: &[FormatItem<'static>] = - format_description!("[hour]:[minute]:[second]"); + format_description!("[hour]:[minute]:[second].[subsecond]"); pub static FORMAT_DATETIME: &[FormatItem<'static>] = - format_description!("[year]-[month]-[day] [hour]:[minute]:[second]"); - pub static FORMAT_DATETIME_TZ: &[FormatItem<'static>] = format_description!( - "[year]-[month]-[day] [hour]:[minute]:[second] [offset_hour sign:mandatory][offset_minute]" - ); + format_description!("[year]-[month]-[day] [hour]:[minute]:[second].[subsecond]"); + pub static FORMAT_DATETIME_TZ: &[FormatItem<'static>] = + format_description!("[year]-[month]-[day] [hour]:[minute]:[second].[subsecond]Z"); } #[cfg(feature = "with-time")]