On further reveiw and playing around with the client side code, it appears that websharper is trying to do the right thing, but JS converts all times into local time. This is standard JS behavior. The weirdness appears to originate from the mismatch of .Net System.DateTime semantics and JS Date semantics.

I redact my advice. I am not sure what a best design decision should be with time. Maybe add a pointer to documentation about JS time with a blurb of gotcha's (Like Date("2015-03-01").GetMonth() will return 1 or 2 depending on what time zone you are in.

By on 12/27/2016 2:44 PM ()

Thank you very much for your detailed investigation!

I am working on a proxy for DateTimeOffset and enable it for remoting. In the first iteration, DateTime will remain to be supported only in UTC mode on the client, this limits the functionality of DateTimeOffset too, but those methods that will compile would be easier to use correctly.

By on 1/9/2017 2:12 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper