-
Notifications
You must be signed in to change notification settings - Fork 378
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
date_epoc fails to convert date from cyrilic #818
Comments
This is how I got it to work on my FreeBSD machine. |
Hi @mslavkov Thanks for this, and especially thanks for posting a fix. I'll add some tests and merge that in. Note: I currently have very little time to work on getssl due to work commitments |
There are probably other dependencies on locale. This may be the tip of an iceberg. Might be safer to save locale at startup and set (and export) LC_ALL="C" globally. If there are any cases where the current locale is needed, special case them. Will probably get in trouble either way, but system tools like |
FIXES srvrco#818 (I hope). in srvrco#818, @mslavkov reported that date fails in the BG.UTF-8 locale, but that LC_ALL=C resolved the issue. Since we already export LANG=C, that would seem to indicate that LC_TIME is overriding it. LC_ALL is the safer (stronger) choice.
Actually, So you must have I've switched |
FIXES srvrco#818 (I hope). in srvrco#818, @mslavkov reported that date fails in the BG.UTF-8 locale, but that LC_ALL=C resolved the issue. Since we already export LANG=C, that would seem to indicate that LC_TIME is overriding it. LC_ALL is the safer (stronger) choice.
Describe the bug
When locale is set to Bulgarian (bg_BG.UTF-8) date is unable to convert the string to check the certificate validity.
...
local cert is for domains: www.example.tld
Failed conversion of
Feb 5 05:16:58 2024 GMT'' using format
%b %d %T %Y %Z''date: illegal time format
usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
[-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]
www.example.tld: certificate needs renewal
...
After adding LC_ALL=C in front of date in date_epoc function:
...
local cert is valid until Feb 5 05:25:12 2024 GMT
local cert is for domains: www.example.tld
www.example.tld: certificate is valid for more than 30 days (until Feb 5 05:25:12 2024 GMT)
...
To Reproduce
On bsd system set locale to Bulgarian (bg_BG.UTF-8) and try to renew cert.
Expected behavior
local cert is valid until Feb 5 05:25:12 2024 GMT
local cert is for domains: www.example.tld
www.example.tld: certificate is valid for more than 30 days (until Feb 5 05:25:12 2024 GMT)
Operating system (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: