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

Wallclocktime strftime #483

Merged
merged 3 commits into from
Feb 4, 2025
Merged

Wallclocktime strftime #483

merged 3 commits into from
Feb 4, 2025

Conversation

bazsi
Copy link
Member

@bazsi bazsi commented Jan 30, 2025

This PR pulls the strftime() implementation from musl and exposes it using the strftime() filterx function.

This adds '%f' and the %z/%Z behaviour similar to what strptime() can easily parse.

@jszigetvari

@bazsi bazsi force-pushed the wallclocktime-strftime branch 2 times, most recently from f0e1333 to aef73cf Compare January 30, 2025 20:22
@jszigetvari
Copy link
Contributor

This would have been really useful for me today.

Copy link
Member

@MrAnno MrAnno left a comment

Choose a reason for hiding this comment

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

LGTM otherwise.

lib/timeutils/wallclocktime.c Show resolved Hide resolved
@MrAnno MrAnno force-pushed the wallclocktime-strftime branch from aef73cf to cea82c9 Compare February 4, 2025 18:28
MrAnno and others added 2 commits February 4, 2025 19:28
commit: 0784374d561435f7c787a555aeab8ede699ed29
tag: v1.2.5

Signed-off-by: László Várady <[email protected]>
This patch ports the musl strftime() implementation into wallclocktime,
trying to minimize changes. Changes include:

1) added '%f' format specifier
2) use the "fake" locale already in the file because of strptime()
3) changed '%z' to use the timezone offset without ':' and '%Z' for a timezone offset with ':'

We never emit timezone names.

Signed-off-by: Balazs Scheidler <[email protected]>
@MrAnno MrAnno force-pushed the wallclocktime-strftime branch from cea82c9 to 07d3aa4 Compare February 4, 2025 18:29
Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: László Várady <[email protected]>
@MrAnno MrAnno force-pushed the wallclocktime-strftime branch from 07d3aa4 to d322f19 Compare February 4, 2025 18:33
@MrAnno MrAnno merged commit c729a35 into axoflow:main Feb 4, 2025
22 checks passed
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.

3 participants