diff --git a/tracing-subscriber/Cargo.toml b/tracing-subscriber/Cargo.toml index edc7f23468..c23fd8f9b0 100644 --- a/tracing-subscriber/Cargo.toml +++ b/tracing-subscriber/Cargo.toml @@ -51,7 +51,7 @@ once_cell = { optional = true, version = "1.13.0" } # fmt tracing-log = { path = "../tracing-log", version = "0.2", optional = true, default-features = false, features = ["log-tracer", "std"] } nu-ansi-term = { version = "0.46.0", optional = true } -time = { version = "0.3.2", features = ["formatting"], optional = true } +time = { version = "0.3.38", features = ["formatting"], optional = true } # only required by the json feature serde_json = { version = "1.0.82", optional = true } @@ -76,7 +76,7 @@ regex = { version = "1.6.0", default-features = false, features = ["std"] } tracing-futures = { path = "../tracing-futures", version = "0.3", default-features = false, features = ["std-future", "std"] } tokio = { version = "1.20.0", features = ["rt", "macros"] } # Enable the `time` crate's `macros` feature, for examples. -time = { version = "0.3.2", features = ["formatting", "macros"] } +time = { version = "0.3.38", features = ["formatting", "macros"] } [badges] maintenance = { status = "experimental" } diff --git a/tracing-subscriber/src/fmt/time/mod.rs b/tracing-subscriber/src/fmt/time/mod.rs index 2838120798..1105cbcc44 100644 --- a/tracing-subscriber/src/fmt/time/mod.rs +++ b/tracing-subscriber/src/fmt/time/mod.rs @@ -13,7 +13,7 @@ mod time_crate; pub use time_crate::UtcTime; #[cfg(feature = "local-time")] -#[cfg_attr(docsrs, doc(cfg(all(unsound_local_offset, feature = "local-time"))))] +#[cfg_attr(docsrs, doc(cfg(feature = "local-time")))] pub use time_crate::LocalTime; /// [`chrono`]-based implementation for [`FormatTime`]. diff --git a/tracing-subscriber/src/fmt/time/time_crate.rs b/tracing-subscriber/src/fmt/time/time_crate.rs index 656677e8d4..3856ce118a 100644 --- a/tracing-subscriber/src/fmt/time/time_crate.rs +++ b/tracing-subscriber/src/fmt/time/time_crate.rs @@ -1,31 +1,17 @@ use crate::fmt::{format::Writer, time::FormatTime, writer::WriteAdaptor}; use std::fmt; -use time::{format_description::well_known, formatting::Formattable, OffsetDateTime}; +use time::{format_description::well_known, formatting::Formattable, OffsetDateTime, UtcDateTime}; /// Formats the current [local time] using a [formatter] from the [`time` crate]. /// /// To format the current [UTC time] instead, use the [`UtcTime`] type. /// -///
-/// Warning: Thetime
-/// crate must be compiled with--cfg unsound_local_offset
in order to use -/// local timestamps. When this cfg is not enabled, local timestamps cannot be recorded, and -/// events will be logged without timestamps. -/// -/// See thetime
-/// documentation for more details. -///
- /// Warning: The - ///time
crate must be compiled with--cfg - /// unsound_local_offset
in order to use local timestamps. When this - /// cfg is not enabled, local timestamps cannot be recorded, and - /// events will be logged without timestamps. - /// - /// See the - ///time
documentation for more details. - ///