Please, can anyone tell me how to get current date and time in yang model, i want to apply a must statement in yang which validates that the entered date and time must greater than the current date and time
Is any function in yang model or xpath to get a current date time
194 views Asked by Ranjeet Kumar Nag At
1
There is no XPath function to obtain current time in YANG. From RFC 6020, 6.4.1 XPath Context:
The core function library contains no such function.
Your requirement is a bit odd. Are you sure you would want to constrain a datastore in such a way? If a value were to be modeled this way in a router config, for example, the operator of this router would have to keep updating this config to make it valid.