Skip to content

YANG always presents the type date-and-time as local time #2116

@mattiaswal

Description

@mattiaswal

Trying to the see the current date and time represented in original timezone.

Tested using netopeer2-server and netopeer2-cli and the model ietf-system@2014-08-06.yang

The server send correctly: 2023-10-18T21:57:21+09:30
but in the CLI the libyang has lost the original timezone information and instead show: 2023-10-18T14:27:21+02:00 (my local timezone)

I expected the data not be transformed from server to client. Is there a reason why it is this way? I can see this transformation is done in the plugin for the type date-and-time in the function ly_time_str2time and ly_time_time2str.

Metadata

Metadata

Assignees

No one assigned

    Labels

    is:questionIssue is actually a question.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions