GithubHelp home page GithubHelp logo

no localtime on openbsd about time HOT 7 CLOSED

brahin2 avatar brahin2 commented on May 26, 2024
no localtime on openbsd

from time.

Comments (7)

jhpratt avatar jhpratt commented on May 26, 2024

Given that one of the issues you linked is for tracing, is your program multi-threaded at the time of invocation? If so, that is why the call is failing. If it crashes the program, please post a stack trace.

from time.

brahin2 avatar brahin2 commented on May 26, 2024

not multithreaded. i posted over there but they said to bring the issue here.

from time.

jhpratt avatar jhpratt commented on May 26, 2024

Can you please provide some more information? At the moment, I have next to nothing to go off of.

from time.

brahin2 avatar brahin2 commented on May 26, 2024

let me know what you need and will try. there really isnt much i can see to go off of either.
using the example from https://time-rs.github.io/book/#getting-started here is what i get:

~/time-demo % cat Cargo.toml
[package]
name = "time-demo"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
time = { version = "0.3", features = ["macros", "local-offset"] }

~/time-demo % cat src/main.rs
use time::OffsetDateTime;

fn main() {
    println!("Hello, world!");

    let now_utc = OffsetDateTime::now_utc();
    dbg!(&now_utc);

    let now_local = OffsetDateTime::now_local();
    dbg!(&now_local);
}

~/time-demo % cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.01s
     Running `target/debug/time-demo`
Hello, world!
[src/main.rs:7] &now_utc = 2023-10-18 0:57:52.375686939 +00:00:00
[src/main.rs:10] &now_local = Err(
    IndeterminateOffset,
)

from time.

jhpratt avatar jhpratt commented on May 26, 2024

After looking at the possible scenarios where this could return the error variant, the reason is that no one has implemented a way to check the number of running threads (for the current process) for OpsnBSD. This information is required for soundness.

from time.

brahin2 avatar brahin2 commented on May 26, 2024

i wouldn't know where to find that to help out. hopefully someone can soon since this breaks a bunch of crates on openbsd. at the very least a note somewhere of what platforms arent supported and maybe why would help. like what would even be needed in libc for example if approrpiate.

from time.

jhpratt avatar jhpratt commented on May 26, 2024

Closing in favor of jhpratt/num_threads#21, which is where the issue would actually be resolved.

from time.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.