Re: [Mono-dev] DateTime Serialization

2010-12-19 Thread CodeSlinger

My bad, I forgot Kind was stored with the data even if zone was not. Still, I
think a good practice to always store/pass zulu and display local.
-- 
View this message in context: 
http://mono.1490590.n4.nabble.com/DateTime-Serialization-tp3093883p3094583.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] DateTime Serialization

2010-12-18 Thread Karsten Fourmont
Hi,

while trying to access a Mono WCF service with a MS.NET client I 
encountered issues with DateTime (de)serialization: it seems mono 
serializes only the ticks and not the DateTimeKind info (UTC, Local, 
Unspecified).

See bug 660424 for description and proposed fixed. (I posted it as WCF 
bug initially but now I think it's rather System.XML)

A word of caution: the proposed fix is not tested, just from looking at 
the code. (I can't build the mono class libs on my windows machine yet)

Maybe bug 648252 is related to this one as well.

Cheers,
  Karsten
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] DateTime Serialization

2010-12-18 Thread CodeSlinger

Just a thought - if using WCF, the client and server could be in different
zones so why would you want anything other than UTC time to be passed around
in the first place which is always what should be stored and only converted
when displayed using the local conventions. The zone is not part of the
datetime data but rather the machine. Dave
-- 
View this message in context: 
http://mono.1490590.n4.nabble.com/DateTime-Serialization-tp3093883p3093925.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] DateTime Serialization

2010-12-18 Thread Atsushi Eno
Well, date and time information can sure be locale independent, but 
NET's DateTime values aren't. It also contains DateTimeKind flag and 
ToBinary() adds that information within the 64 bit return value in 
addition to UTC time ticks.

So, Karsten is right and that is indeed a good point. I'll visit bug 
#660424 tomorrow.

Atsushi Eno

(2010/12/19 4:19), CodeSlinger wrote:
 Just a thought - if using WCF, the client and server could be in different
 zones so why would you want anything other than UTC time to be passed around
 in the first place which is always what should be stored and only converted
 when displayed using the local conventions. The zone is not part of the
 datetime data but rather the machine. Dave

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list