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

snmp-ups: Add a generic function to convert date #1078

Merged
merged 3 commits into from Sep 1, 2021

Conversation

aquette
Copy link
Member

@aquette aquette commented Aug 23, 2021

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

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>
@aquette
Copy link
Member Author

aquette commented Aug 23, 2021

implement proposal of #1076

Copy link
Member

@jimklimov jimklimov left a 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

@aquette
Copy link
Member Author

aquette commented Sep 1, 2021

so, going ahead and merging. we can still refine later for relocating this code, if worth

@aquette aquette merged commit ab6041c into networkupstools:master Sep 1, 2021
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 25, 2021
…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.
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 25, 2021
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.
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 27, 2021
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.
jimklimov added a commit to jimklimov/nut that referenced this pull request Oct 12, 2021
…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.
jimklimov added a commit to jimklimov/nut that referenced this pull request Oct 12, 2021
…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.
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.

None yet

3 participants