Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to get LocalTime on OpenBSD #2764

Closed
brahin2 opened this issue Oct 17, 2023 · 1 comment
Closed

unable to get LocalTime on OpenBSD #2764

brahin2 opened this issue Oct 17, 2023 · 1 comment

Comments

@brahin2
Copy link

brahin2 commented Oct 17, 2023

Bug Report

Version

tracing = "0.1.39"
tracing-subscriber = { version = "0.3.17", features = ["local-time"] }
time = { version = "0.3.30", features = ["local-offset", "macros"] }

Platform

% uname -a
OpenBSD myhostname.my.domain 7.4 GENERIC.MP#1397 amd64

Crates

tracing_subscriber

Description

with the following code from the examples of LocalTime i get <unknown time> on Openbsd. wasnt sure if a time specific issue so started here since im doing it via this crate for logging. if i do date at the cli otherwise i do get a correct local time.

a similar was found seen at Drakulix/simplelog.rs#138 except there is a crash where this is just <unknown time> as i researched the error.

without a localtime the logs are less useful and need more human processing to convert timestamps.

% cat src/main.rs
use tracing_subscriber;
use tracing_subscriber::fmt::time::LocalTime;

mod cli;

fn main() {
    tracing_subscriber::fmt()
        .compact()
        .with_timer(LocalTime::rfc_3339())
        .with_max_level(tracing::Level::DEBUG)
        .with_target(false)
        .init();
    tracing::info!("test");
}
 % cargo run
   Compiling MYCRATE v0.1.0 (/home/MYUSER/MYCRATE)
    Finished dev [unoptimized + debuginfo] target(s) in 1.57s
     Running `target/debug/MYCRATE`
<unknown time>  INFO test

cc @botovq

@davidbarsky
Copy link
Member

davidbarsky commented Oct 17, 2023

This is an issue with the time crate. Please consider opening an issue there: https://github.com/time-rs/time. We can't really assist you, I'm sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants