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

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

Closed
mattiaswal opened this issue Oct 18, 2023 · 1 comment
Closed

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

mattiaswal opened this issue Oct 18, 2023 · 1 comment
Labels
is:question Issue is actually a question.

Comments

@mattiaswal
Copy link

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.

@michalvasko
Copy link
Member

Yes, the canonical value is being used.

@michalvasko michalvasko added the is:question Issue is actually a question. label Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:question Issue is actually a question.
Projects
None yet
Development

No branches or pull requests

2 participants