[Mono-dev] Remoting with DateTime
jaebird at gmail.com
Tue Aug 14 18:37:19 EDT 2007
Ok added bug# 82400 to help track this. I've been playing with Lionel's
patch. What i've found out so far is that the ObjectReader from
System.Runtime.Serialization.Formatters.Binary has a method that is executed
when trying to de-serialize the DateTime struct. The method is
ReadPrimitiveTypeValue, which has a case:
return new DateTime (reader.ReadInt64());
This is causing an explosion because now the DateTimeKind is included. This
is quite a mess at present. Needless to say if you try to remote a DateTime
that has a kind of Local or Utc it will die. The ObjectReader is not using
the ISerializable interface, just calling the DateTime ctor with "ticks",
but they are not ticks yet!
I'll keep looking, but someone familiar with why it was done this way should
speak up if possible.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list