From: <tr...@do...> - 2013-01-25 20:15:54
|
<p>The following issue has been added to a project that you are monitoring.</p> <table border="0"> <tr> <td width="90px" valign="top"><b>Title:</b></td> <td>VDS.RDF.Query.SparqlParameterizedString.SetLiteral(string name, DateTime value) truncates milliseconds</td> </tr> <tr> <td><b>Project:</b></td> <td>Core Library (dotNetRDF.dll)</td> </tr> <tr> <td><b>Created By:</b></td> <td>frisbee</td> </tr> <tr> <td><b>Milestone:</b></td> <td>none</td> </tr> <tr> <td><b>Category:</b></td> <td>none</td> </tr> <tr> <td><b>Priority:</b></td> <td>Normal</td> </tr> <tr> <td><b>Type:</b></td> <td>Bug</td> </tr> <tr> <td><b>Description:</b></td> </tr> <tr> <td colspan="2"><p> </p> <div> when using VDS.RDF.Query.SparqlParameterizedString.SetLiteral with a DateTime object, the milliseconds of the DateTime object are truncated.</div> <div> Below is sample query (well portion of a query) that demonstrates the datetime returned from the parameterization results in: "2013-01-25T19:54:39Z"^^<http://www.w3.org/2001/XMLSchema#dateTime></div> <div> while the actual datetime is: 2013-01-25T19:54:39.6199846Z</div> <div> </div> <div> # Begin code sample</div> <div> </div> <div> DateTime currentTime = DateTime.UtcNow;</div> <div> SparqlParameterizedString sparqlQuery =</div> <div> new SparqlParameterizedString(@"<http://mydata/uri1234> <http://mydata/updatedDate> @date .");</div> <div> </div> <div> sparqlQuery.SetLiteral("date", currentTime);</div> <div> </div> <div> //currentTime.ToString("o")</div> <div> // 2013-01-25T19:54:39.6199846Z</div> <div> </div> <div> // sparqlQuery.ToString();</div> <div> // <http://mydata/uri1234> <http://mydata/updatedDate> "2013-01-25T19:54:39Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .</div></td> </tr> </table> <p> More information on this issue can be found at <a href="http://www.dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=305" target="_blank">http://www.dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=305</a></p> <p style="text-align:center;font-size:8pt;padding:5px;"> If you no longer wish to receive notifications, please visit <a href="http://www.dotnetrdf.org/tracker/Account/UserProfile.aspx" target="_blank">your profile</a> and change your notifications options. </p> |