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

gen.pl: insert the current date and version in generated man page #7782

Closed
wants to merge 1 commit into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Sep 27, 2021

Reported-by: Gisle Vanem
Ref: #7780

@bagder bagder mentioned this pull request Sep 27, 2021
@bagder bagder closed this in 15910df Sep 27, 2021
@bagder bagder deleted the bagder/manpage-date-version branch September 27, 2021 20:36
@gvanem
Copy link
Contributor

gvanem commented Sep 28, 2021

Almost, but with my Strawberry Perl, this generates:

curl 7.80.0                        1b 1e 1Y                            curl(1)

With Cygwin's Perl, it's fine; Sep 28 2021.

@gvanem
Copy link
Contributor

gvanem commented Sep 28, 2021

Update: My Strawberry Perl doesn't like the %e. But a %d works. Giving sep 28 2021 (lower-case month name).

@bagder
Copy link
Member Author

bagder commented Sep 28, 2021

It of course begs the question if your perl install isn't broken and if we should really care about broken perl installs. I found no records of %e not working in perl generally.

But I also checked a few other man pages and the date format used vary greatly. I don't think using a zero-prefixed number (%d instead of %e) would hurt. Maybe even use the full month name.

What do you think about "%B %d %Y" ?

@jay
Copy link
Member

jay commented Sep 28, 2021

It of course begs the question if your perl install isn't broken

It's not. strawberry perl posix seems to be using the C runtime's strftime and older MS CRTs likely do not support %e. I tried "%b %e %Y" in Windows 7 with a recent strawberry perl and I get a blank string.

What do you think about "%B %d %Y" ?

That works here and all the format specifiers are C89.

@gvanem
Copy link
Contributor

gvanem commented Sep 29, 2021

What do you think about "%B %d %Y" ?

Work fine.

@bagder
Copy link
Member Author

bagder commented Sep 29, 2021

I'll do a PR with that change as soon as we get the winsock situation in master stable again

bagder added a commit that referenced this pull request Sep 29, 2021
The previous strftime format used didn't work correctly on Windows, so
change to %B %d %Y which today looks like "September 29 2021".

Reported-by: Gisle Vanem
Bug: #7782
bagder added a commit that referenced this pull request Sep 30, 2021
Follow-up to 15910df

The previous strftime format used didn't work correctly on Windows, so
change to %B %d %Y which today looks like "September 29 2021".

Reported-by: Gisle Vanem
Bug: #7782
Closes #7793
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants