Open Lushkin opened 3 years ago
Hello @Lushkin, we have a bug with duration that is on our list to fix in the next parser update. I don't have an exact date on when that will be available but I will update this thread when we do. Most likely sometime this late spring or early summer.
just leaving this commemt to have a message when this gets solved. Ty Microsoft Team DT look amazing and very promising :) HOpe to see soon more features.
- P1Y0M0W0D
For the record, this one is not a valid ISO-8601 duration, as weeks (W) should not appear together with any other units.
I try to update a twin which contains a property using a duration schema. A have created an "Asset" model (based on opendigitaltwins-building Ontology models) via the Azure Digital Twins Explorer.
As you can see here I have a TestAsset with almost all values filled except these which uses the duration schema.![image](https://user-images.githubusercontent.com/2601842/107961149-cd532f80-6fa5-11eb-8214-47647ef8923e.png)
Then I have tried to update the twin with the "expectedLife" value as following: P1Y for 1 year duration. But it never works. I always get an error:![image](https://user-images.githubusercontent.com/2601842/107961397-2622c800-6fa6-11eb-9529-12e545c91aab.png)
I have also tried to update the twin via the C# SDK, but I have the same issue.
Am I using a wrong format for my duration value ? I have reported to the documentation which explains that the used format should be ISO 8601.![image](https://user-images.githubusercontent.com/2601842/107961656-7e59ca00-6fa6-11eb-8bd1-5f1e67ddbea0.png)
So I have followed this documentation to build my duration value. But nothing seems to working.
I have tried the following values to update my twin: