Please consider supporting Nodatime property types. Thanks!
Cool, I wasn't aware of Noda Time until now. I've done a quick scan of an MSDN article about it and it looks good. If it was co-developed by Jon Skeet, it automatically became my favorite .NET library.
From the quick scan of that article, I've got the main idea of Noda Time: The time offsets of time zones. This is great. But, I was wondering if there were other benefits of Noda Time you could tell us about.
I'd say that in Kentico Cloud, the 'Date & time' elements store the information without relations to any time zones. Is that correct, @TomasHruby ?
With that in mind, I'd say the author of a website can set their own base time zone, say UTC (UTC is not being considered as a time zone probably, but you certainly get the gist). Then, using Noda Time (or any other library), the application can compute 'localized' time.
That being said, it seems to be appropriate to have support for Noda Time in the SDKs, boilerplates and sample apps, rather than in Kentico Cloud itself.
Do I understand that correctly? If not, just tell me. I really like the idea of having support of time zones.
You're absolutely correct in your assumptions, @JanLenoch .
Hi @JacobMojiwat ! Thanks for a nice suggestion!
There is no out of the box deserialization at the moment.
What you can do is that you can either wrap or extend the (possibly generated) model and add a ZonedDateTime property that would be initialized from the standard DateTime property.
Anyway, it would be great if the SDK supported any custom type during deserialization.
@MartinHejtmanek is currently working on a prototype of "value convertors" here: https://github.com/Kentico/delivery-sdk-net/issues/55 this would solve the issue nicely.
We'd appreciate if you'd tell us what you think.
Good news! It's possible now. In Delivery SDK v4.7, we've added support for "value converters". Also, we've added an example specifically for the ZonedDateTime.
@[email protected] , @[email protected] Sorry for this very late reply. Haven't been following this issue until recently when we had to update our code. A belated thank you very much for building this feature and making it easy for us to integrate.
Hi @jmojiwat , you're welcome! Feel free to let us know your comments about how it worked for you.