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
Test Local functions against date command #682
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
src/offset/local/mod.rs
Outdated
// avoid running this on macOS, temporarily | ||
// for date_path in ["/usr/bin/date", "/bin/date"] { | ||
for date_path in ["/usr/bin/date"] { | ||
if path::Path::new(date_path).exists() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make this use an early continue? That would help reduce rightward drift.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call, the code was a bit gnarly, I've made some improvements by using NaiveDateTime instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the loop across date commands as I tried this out on macOS, but I couldn't find the same command line arguments and so wasn't able the replicate the behavior desired to find the local timezone
This is split from #678 and just adds the extra tests