Skip to content

Commit ae5bdba

Browse files
authored
Merge pull request #30 from jyn514/now-utc
Use UTC timezone for `ts` consistently This fixes slog-rs/slog#308
2 parents 2b57966 + bb4d1bf commit ae5bdba

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,7 @@ where
332332
pub fn add_default_keys(self) -> Self {
333333
self.add_key_value(o!(
334334
"ts" => FnValue(move |_ : &Record| {
335-
time::OffsetDateTime::now_local()
336-
.unwrap_or_else(|_| time::OffsetDateTime::now_utc())
335+
time::OffsetDateTime::now_utc()
337336
.format(&time::format_description::well_known::Rfc3339)
338337
.ok()
339338
}),

0 commit comments

Comments
 (0)