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

tm_gmtoff unknown field - Without feature local-offset #495

Closed
Nassiel opened this issue Aug 4, 2022 · 2 comments
Closed

tm_gmtoff unknown field - Without feature local-offset #495

Nassiel opened this issue Aug 4, 2022 · 2 comments
Labels
C-invalid Category: no issue exists or the issue cannot be reproduced

Comments

@Nassiel
Copy link

Nassiel commented Aug 4, 2022

Hi,

While compiling with the ESP toolchain and for an ESP32-IDF, time launches the next error:

error[E0609]: no field `tm_gmtoff` on type `tm`
   --> /home/<myhome>/.cargo/registry/src/github.com-1ecc6299db9ec823/time-0.1.44/src/sys.rs:392:30
    |
392 |             let gmtoff = out.tm_gmtoff;
    |                              ^^^^^^^^^ unknown field
    |
    = note: available fields are: `tm_sec`, `tm_min`, `tm_hour`, `tm_mday`, `tm_mon` ... and 4 others

Despite issue #438 I'm not using the local-offset feature, and I don't see that Chrono 0.4.20 requests it.
System information:

rustc --print cfg
debug_assertions
panic="unwind"
target_abi=""
target_arch="x86_64"
target_endian="little"
target_env="gnu"
target_family="unix"
target_feature="fxsr"
target_feature="llvm14-builtins-abi"
target_feature="sse"
target_feature="sse2"
target_has_atomic="16"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="ptr"
target_has_atomic_equal_alignment="16"
target_has_atomic_equal_alignment="32"
target_has_atomic_equal_alignment="64"
target_has_atomic_equal_alignment="8"
target_has_atomic_equal_alignment="ptr"
target_has_atomic_load_store="16"
target_has_atomic_load_store="32"
target_has_atomic_load_store="64"
target_has_atomic_load_store="8"
target_has_atomic_load_store="ptr"
target_os="linux"
target_pointer_width="64"
target_thread_local
target_vendor="unknown"
unix

I guess that the problem is that the target os (based on your code and cfg) is Linux, but it's a FreeRTOs with a custom toolchain, and it may not contain that field internally. If you need any further information, please let me know.

@jhpratt
Copy link
Member

jhpratt commented Aug 4, 2022

Can you share your Cargo.toml? The [dependencies] section is what I'd like to see, specifically.

@Nassiel
Copy link
Author

Nassiel commented Aug 5, 2022

Yes, your guess is right, I was using Chrono 4.20, despite being a new release they didn't update to the latest version of Time. I move to use time directly and it works smoothly. Thanks jhpratt for the fast response.

@Nassiel Nassiel closed this as completed Aug 5, 2022
@jhpratt jhpratt added the C-invalid Category: no issue exists or the issue cannot be reproduced label Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-invalid Category: no issue exists or the issue cannot be reproduced
Projects
None yet
Development

No branches or pull requests

2 participants