tod: BUG: Tasks with fixed (non-floating) timezone that are non tz-date compatible crash
While testing #592 I discovered the query gave me an error
/Users/.../Library/Application Support % tod task list -f "tod | overdue" thread 'main' panicked at /Users/*/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tod-0.5.7/src/time.rs:69:46: calledResult::unwrap()on anErrvalue: "'GMT -7:00' is not a valid timezone"
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 19 (16 by maintainers)
This was a fun one to remember this morning. We should not run this into the future as we now fetch users time zone from API and set that in the config.
We’re good - thanks for solving!
Tested with current version - confirmed issue is resolved.
Fixed in https://github.com/alanvardy/tod/pull/640
Wow, thanks for the investigation. I’ll take a closer look at this tomorrow morning and come up with some ideas. I would prefer to not crash… perhaps I can find a way to emit a clear error message or fall back gracefully to config.
Also (maybe) related, several functions were deprecated/modfied so maybe some tweaks need to be made? https://docs.rs/chrono/latest/chrono/struct.DateTime.html