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

Fixed calculation error caused by invalid octal number #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yuuki0xff
Copy link
Contributor

"%j" format of GNU date command will be replaced a zero-padded 3 digit number. When day-of-year < 100, leading character of NOWDAYS or ENDDAYS is '0' and bash interprets two variables as octal.

$ TZ= date +%j -d 2019-03-30
089
$ echo $(( 089 ))
bash: 089: value too great for base (error token is "089")

"%j" format of GNU date command will be replaced a zero-padded 3 digit
number.  When `day-of-year < 100`, leading character of `NOWDAYS` or `ENDDAYS`
is '0' and bash interprets two variables as octal.

```
$ TZ= date +%j -d 2019-03-30
089
$ echo $(( 089 ))
bash: 089: value too great for base (error token is "089")
```
@D3-jwatts
Copy link

Just got bit by this: Apparently everyone renews their certificates mid-to-late in the year?

@yuuki0xff
Copy link
Contributor Author

@fluffle
Please merge it.

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.

2 participants