Difference between NetMF and full framework with dates?

As part of my current project, I have to “synchronize” time between a server and its clients. I wanted to do it by sending DateTime.Now.Ticks from the server (Windows based) to the FEZ boards (Panda II) but I get an error stating that [em]“Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks.”[/em]

After checking, I have indeed a problem :

DateTime.MaxValue.Ticks =  441796895990000000  (NetMF)
DateTime.MaxValue.Ticks = 3155378975999999999 (.Net4)
DateTime.Now.Ticks      =  634799638566315716 (on PC)

Both “MaxValues” are Int64, but NetMF one is 10 times less than .Net4. And of course .Net4 ticks are greater than NetMF maxvalue :frowning:

I will do what I want using another method (as I don’t need much precision), but I think it’s weird. Has anyone else got this issue ?

Have you checked TImeSpan.TicksPerSecond? They’re usually the same but it can vary.

I know they can vary, though I didn’t think at it until you mentionned it :wink:

But they are the same : 10000000 :frowning:

http://www.tinyclr.com/forum/topic?id=741&page=1

Ah, stupid Epoch, that would have been my second guess.

Thanks Mike !

I will use another method to synchronize, though, as I don’t want to add a fix that would be wrong at the next revision of NetMF… Quick note : I have the latest software and firmware installed, so it doesn’t seem to be fixed.