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
snmp-ups: Add a generic function to convert date #1078
Conversation
This provides conversion from US date (mm/dd/yyyy) to ISO Calendar date (yyyy-mm-dd). Also adapt the function callback mechanism to make it more generic, and only char* to char* reformating, beside from the int to char* value lookup. Signed-off-by: Arnaud Quette <ArnaudQuette@eaton.com>
implement proposal of #1076 |
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.
Can't help thinking if the usdate to isodate routine fits better in "str" or "common" helper sources, to avoid duplication or discrepancy when/if other code eventually adds this feature to go with #1076
Otherwise LGTM
so, going ahead and merging. we can still refine later for relocating this code, if worth |
…ools#1078)" This reverts commit ab6041c to allow a quick merge of other changes into 42ITy fork, and just then re-apply this commit for a complicated change analysis.
Note: lacks master-branch commit ab6041c from upstream NUT PR networkupstools#1078 (date conversions) which changes some API/types that DMF effort also changed, so needs some extra analysis to digest into 42ITy NUT.
Note: lacks master-branch commit ab6041c from upstream NUT PR networkupstools#1078 (date conversions) which changes some API/types that DMF effort also changed, so needs some extra analysis to digest into 42ITy NUT.
…10-12 Still without upstream change ab6041c that needs more work to integrate with DMF changes of same codebase, see: commit 8809800 (master-without-fun-change) Author: Jim Klimov <jim@jimklimov.com> Date: Sat Sep 25 17:27:26 2021 +0200 Revert "snmp-ups: Add a generic function to convert date (networkupstools#1078)" This reverts commit ab6041c to allow a quick merge of other changes into 42ITy fork, and just then re-apply this commit for a complicated change analysis.
…ools#1078) to DMF branch Revert "Revert "snmp-ups: Add a generic function to convert date (networkupstools#1078)"" This reverts commit 8809800 to apply the upstream change into DMF branch. NOTE: Date mapping not referenced from DMF codebase at this point; but should be in static snmp-ups driver.
This provides conversion from US date (mm/dd/yyyy) to ISO
Calendar date (yyyy-mm-dd).
Also adapt the function callback mechanism to make it more
generic, and only char* to char* reformating, beside from the
int to char* value lookup.
Signed-off-by: Arnaud Quette ArnaudQuette@eaton.com