Skip to content

Commit 16874a1

Browse files
committed
refactor: OffsetDateTime -> LocalDateTime
1 parent d48b7e2 commit 16874a1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/time.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
/// This trait is used by [HierarchicalLayer] to include a timestamp with each
44
/// [Event] when it is logged.
55
///
6-
/// Notable default implementations of this trait are [OffsetDateTime] and `()`.
6+
/// Notable default implementations of this trait are [LocalDateTime] and `()`.
77
/// The former prints the current time as reported by [time's OffsetDateTime]
8-
/// (note that it may panic! make sure to check out the docs for the [OffsetDateTime]),
8+
/// (note that it may panic! make sure to check out the docs for the [LocalDateTime]),
99
/// and the latter does not print the current time at all.
1010
///
1111
/// Inspired by the [FormatTime] trait from [tracing-subscriber].
@@ -44,9 +44,9 @@ impl FormatTime for () {
4444
// Can't use `tracing_subscriber::fmt::time::SystemTime` since it uses
4545
// private `datetime` module to format the actual time.
4646
#[derive(Debug, Clone, Copy, Eq, PartialEq, Default)]
47-
pub struct OffsetDateTime;
47+
pub struct LocalDateTime;
4848

49-
impl FormatTime for OffsetDateTime {
49+
impl FormatTime for LocalDateTime {
5050
fn format_time(&self, w: &mut impl std::fmt::Write) -> std::fmt::Result {
5151
let time = time::OffsetDateTime::now_local().expect("time offset cannot be determined");
5252
write!(w, "{}", time)

0 commit comments

Comments
 (0)