CSHTML5 DateTime DateTimeKind.Unspecified bug, try workaround : missing get_Millisecond

Please report bugs here. If you are unsure whether something is a bug or an expected behavior, please post it on the "Technical Support" forum instead, and wait for a moderator to handle/move the post.
Posts: 172
Joined: Fri Jun 24, 2016 2:19 am

CSHTML5 DateTime DateTimeKind.Unspecified bug, try workaround : missing get_Millisecond

Postby Sesztak » Sat Sep 17, 2016 3:34 am

Dear JS-Support,

Background: according present state (beta 9.2) it is not possible to use such a fundamental type like DateTime with Server - Client scenario only with custom proprietary "workarounds".

(you promised to re-write the whole DateTime class -"JS-Support » Sun Jul 24, 2016 9:56 pm: "The DateTime class will be completely rewritten from scratch in a few weeks" "- but no any update occured till now).

So, the only way to make the DateTime class usable we use a custom function at CSHTML5 client side, like:

// CSHTML5 DateTime custom proprietary workaround (deserialization fault at Server side) :
private DateTime ReMakeCSHTML5_V9_2_DateTime (DateTime _time)
_time = new DateTime(
// , _time.Millisecond // not possible because missing: "The method "DateTime.get_Millisecond" is not yet supported."
return _time;
// note: without workaround you got deserialization error at Server side

As you see our biggest problem to loose millisecond part of time as "DateTime.get_Millisecond" is not yet supported.

So, our question(s):
1./ is the "official" (from your side) & properly working DateTime will be released within a reasonable time ?
2./ is there any solution based on above mentioned custom workaround to make good (put is back) the missing millisecond part of time ?
(convert from based on ticks and recreate based on ticks???: "DateTime.get_Ticks" is not yet supported too :((( )

Thanks for your kind reply,
Best Regards,

Return to “Bug Reports”

Who is online

Users browsing this forum: Google [Bot] and 6 guests