From d1e5adf0a751b9fd5caa3e520545adbd562dcf54 Mon Sep 17 00:00:00 2001 From: Han Xu Date: Mon, 10 Apr 2023 16:57:08 -0700 Subject: [PATCH] subscriber: update time crate to 0.3.18 Bump up the version of the `time` crate so that we don't need to build with `--cfg unsound_local_offset` for using `fmt::time::LocalTime`. --- tracing-subscriber/Cargo.toml | 4 ++-- tracing-subscriber/src/fmt/time/time_crate.rs | 24 ------------------- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/tracing-subscriber/Cargo.toml b/tracing-subscriber/Cargo.toml index d39da0cdc8..8bad1b7729 100644 --- a/tracing-subscriber/Cargo.toml +++ b/tracing-subscriber/Cargo.toml @@ -49,7 +49,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.18", features = ["formatting"], optional = true } # only required by the json feature serde_json = { version = "1.0.82", optional = true } @@ -73,7 +73,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.18", features = ["formatting", "macros"] } [badges] maintenance = { status = "experimental" } diff --git a/tracing-subscriber/src/fmt/time/time_crate.rs b/tracing-subscriber/src/fmt/time/time_crate.rs index 656677e8d4..5092588b56 100644 --- a/tracing-subscriber/src/fmt/time/time_crate.rs +++ b/tracing-subscriber/src/fmt/time/time_crate.rs @@ -6,17 +6,6 @@ use time::{format_description::well_known, formatting::Formattable, OffsetDateTi /// /// To format the current [UTC time] instead, use the [`UtcTime`] type. /// -///
-///
-///     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.
-/// 
-/// /// [local time]: https://docs.rs/time/0.3/time/struct.OffsetDateTime.html#method.now_local /// [UTC time]: https://docs.rs/time/0.3/time/struct.OffsetDateTime.html#method.now_utc /// [formatter]: https://docs.rs/time/0.3/time/formatting/trait.Formattable.html @@ -76,19 +65,6 @@ impl LocalTime { /// [`time` crate] with the provided provided format. The format may be any /// type that implements the [`Formattable`] trait. /// - /// - ///
- ///
-    ///     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.
-    /// 
- /// /// Typically, the format will be a format description string, or one of the /// `time` crate's [well-known formats]. ///