-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
bgpd, lib: Use frrstr_time() when using ctime_r() #17684
bgpd, lib: Use frrstr_time() when using ctime_r() #17684
Conversation
8c6fa66
to
fc0bb7e
Compare
newline is not expected to be printed in JSON outputs, e.g.: ``` "lastUpdate":{"epoch":1734490463,"string":"Wed Dec 18 04:54:23 2024\n" ``` Signed-off-by: Donatas Abraitis <[email protected]>
fc0bb7e
to
6dceb6f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like there's some mixing here: a) there are some raw calls to ctime_r(), using some time value, and b) there's the existing lib api, that does some arithmetic and then calls ctime_r() on the result. and there are some places in the code where the code can be replaced with (b), but there are also some places where (a) is needed?
…-JSON For JSON output we don't need newline to be printed. Before: ``` "lastUpdate":{"epoch":1734490463,"string":"Wed Dec 18 04:54:23 2024\n" ``` After: ``` "lastUpdate":{"epoch":1734678560,"string":"Fri Dec 20 09:09:20 2024" ``` Signed-off-by: Donatas Abraitis <[email protected]>
Replace with time_to_string(). Signed-off-by: Donatas Abraitis <[email protected]>
Signed-off-by: Donatas Abraitis <[email protected]>
6dceb6f
to
8f5821e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, thanks for cleaning that up
No description provided.