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

Test Local functions against date command #682

Merged
merged 3 commits into from May 1, 2022

Conversation

esheppa
Copy link
Collaborator

@esheppa esheppa commented Apr 30, 2022

This is split from #678 and just adds the extra tests

@esheppa esheppa changed the title add test against date command Test Local functions against date command Apr 30, 2022
Copy link
Contributor

@djc djc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

// 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() {
Copy link
Contributor

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.

Copy link
Collaborator Author

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

Copy link
Collaborator Author

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

@esheppa esheppa mentioned this pull request May 1, 2022
@djc djc merged commit 0826d63 into chronotope:tz-info May 1, 2022
@esheppa esheppa deleted the tz-info-tests branch May 1, 2022 10:54
esheppa added a commit to esheppa/chrono that referenced this pull request May 13, 2022
djc pushed a commit that referenced this pull request May 13, 2022
djc pushed a commit that referenced this pull request Jun 8, 2022
djc pushed a commit that referenced this pull request Jun 9, 2022
djc pushed a commit that referenced this pull request Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants