-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
no field tm_gmtoff
on type tm
#501
Comments
Yes. That's how the local offset is obtained.
I just checked, and I'm honestly surprised that that target even has support for |
Actually, this is a tier 3 target, meaning official builds are not available. Would you mind providing instructions on how to set up my local environment to support this target? I run Fedora 36 if it matters. |
Sure, this easiest way I coul think of
Some of the prerequisites I could have missed and here is the reference https://espressif-trainings.ferrous-systems.com/02_2_software.html |
Thanks! I was able to reproduce the error locally. I just cross-checked In the future, |
Just pushed up that change. I wasn't able to get that repository to run |
Thanks for the fix and it compiles now.
dbg!(time::OffsetDateTime::now_local());
time::OffsetDateTime::now_local() = Err(
IndeterminateOffset,
) |
Correct. There is a workaround that may work on that target, but it relies on using |
Where is datetime initialised? The error[E0425]: cannot find value `datetime` in this scope
--> /home/chung/.cargo/git/checkouts/time-91f7c71100c3ea58/6894ec1/src/sys/local_offset_at/unix.rs:141:45
|
141 | let diff_secs: i32 = (local_timestamp - datetime.unix_timestamp())
| ^^^^^^^^ not found in this scope |
Apparently it's not. Keep in mind that using that flag is both unsound and not supported, though. There are no guarantees whatsoever — including a successful compilation. I'll take a look at this specific case, but it's not something ordinarily checked by myself or CI. |
Just leaving this comment here for other fellow ESP32 users, to note that since version
|
I am having a similar issue with #495 but with a different cause.
I am compiling on Debian 10 for ESP32(target riscv32imc-esp-espidf)
The difference is I am using time v0.3.13 already and the error
is caused by this line https://github.com/time-rs/time/blob/v0.3.13/src/sys/local_offset_at/unix.rs#L49
The deps in Cargo.toml is as below
Is there a hidden requirment on libc?
The text was updated successfully, but these errors were encountered: