ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Tupitsyn (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (IGNITE-1780) .Net: DateTime is seialized incorrectly.
Date Fri, 23 Oct 2015 09:02:27 GMT

     [ https://issues.apache.org/jira/browse/IGNITE-1780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pavel  Tupitsyn closed IGNITE-1780.
-----------------------------------
    Assignee: Vladimir Ozerov  (was: Pavel  Tupitsyn)

> .Net: DateTime is seialized incorrectly.
> ----------------------------------------
>
>                 Key: IGNITE-1780
>                 URL: https://issues.apache.org/jira/browse/IGNITE-1780
>             Project: Ignite
>          Issue Type: Task
>          Components: interop
>    Affects Versions: ignite-1.4
>            Reporter: Vladimir Ozerov
>            Assignee: Vladimir Ozerov
>            Priority: Critical
>             Fix For: 1.5
>
>
> Add the following test to PortableSelfTest.cs:
> {code}
> [Test]
> public void TestWriteDate()
> {
>     DateTime time = DateTime.Now;
>     DateTime timeUtc = DateTime.UtcNow;
>     Assert.AreEqual(_marsh.Unmarshal<DateTime>(_marsh.Marshal(time)), time);
>     Assert.AreEqual(_marsh.Unmarshal<DateTime>(_marsh.Marshal(timeUtc)), timeUtc);
> }
> {code}
> Observe that it fails becuase we loose DateTimeKind. 
> DateTime must be serialized in portable form only in two cases:
> 1) IPortableWriter.WriteDate()
> 2) IPortableWriter.WriteDateArray()
> In all other cases it should be serialized in some other form. E.g., we can introduce
new wrapper type ".NET-specific" and wrap DateTime, Collections, Arrays (IGNITE-1779) in it.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message