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

postToMap.sh: fix bug with %d versus %e #1134

Merged
merged 1 commit into from
Apr 9, 2022

Conversation

EricClaeys
Copy link
Collaborator

  • On the 8th or 9th of the month the check for day to upload fails since "date +%d" on the 8th of the month 8 returns "08". When doing arithmetic, the shell treats a number that starts with "0" as octal and 08 and 09 are invalid octal numbers. I had the exact same issue with the dark subtract script and wasn't able to find a good way around it. Using "date +%e" returns "8" which is fine in shell arithmetic

* On the 8th or 9th of the month the check for day to upload fails since "date +%d" on the 8th of the month 8 returns "08".  When doing arithmetic, the shell treats a number that starts with "0" as octal and 08 and 09 are invalid octal numbers.  I had the exact same issue with the dark subtract script and wasn't able to find a good way around it.  Using "date +%e" returns "8" which is fine in shell arithmetic
@EricClaeys EricClaeys added the bug needs software change label Apr 9, 2022
Copy link
Collaborator

@thomasjacquin thomasjacquin left a comment

Choose a reason for hiding this comment

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

Thanks for catching that

@EricClaeys EricClaeys merged commit 83615f0 into master Apr 9, 2022
@EricClaeys EricClaeys deleted the postToMap.sh-fix-bug-with-%d-versus-%e branch April 9, 2022 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs software change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants