Question

I've encountered a problem in Rowlex recently. It is related to datetime retrieving.
In my RDF file, I have two instances like this:

<Ontologyowl:Note rdf:about="http://www.faraway_learning.edu/ehsanm/not106179">
    <Ontologyowl:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Test1</Ontologyowl:title>
    <Ontologyowl:dateOfCreation rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2009-03-28T20:58:31Z</Ontologyowl:dateOfCreation>
    <Ontologyowl:relatedToClass rdf:resource="clas000021"/>
    <Ontologyowl:ranking_general_stuNum rdf:datatype="http://www.w3.org/2001/XMLSchema#int">0</Ontologyowl:ranking_general_stuNum>
    <Ontologyowl:ranking_general_tchNum rdf:datatype="http://www.w3.org/2001/XMLSchema#int">0</Ontologyowl:ranking_general_tchNum>
    <Ontologyowl:isShared rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">True</Ontologyowl:isShared>
    <Ontologyowl:anonymousAuthor rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">False</Ontologyowl:anonymousAuthor>
</Ontologyowl:Note>
<Ontologyowl:Note rdf:about="http://www.faraway_learning.edu/ehsanm/not941065">
    <Ontologyowl:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Test 2</Ontologyowl:title>
    <Ontologyowl:dateOfCreation rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2008-09-09T13:18:35Z</Ontologyowl:dateOfCreation>
    <Ontologyowl:relatedToResource>
        <Ontologyowl:LearningResource rdf:about="res323717"/>
    </Ontologyowl:relatedToResource>
    <Ontologyowl:ranking_general_stuNum rdf:datatype="http://www.w3.org/2001/XMLSchema#int">0</Ontologyowl:ranking_general_stuNum>
    <Ontologyowl:ranking_general_tchNum rdf:datatype="http://www.w3.org/2001/XMLSchema#int">0</Ontologyowl:ranking_general_tchNum>
    <Ontologyowl:isShared rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">True</Ontologyowl:isShared>
    <Ontologyowl:anonymousAuthor rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">False</Ontologyowl:anonymousAuthor>
</Ontologyowl:Note>

and I use this code to retrieve datetime of these two instances:

OwlThing[] noteThing = rdfDoc.GetIndividuals(Note.Uri, false, false, false);
    foreach (OwlThing item in noteThing)
    {
        DataRow dtRow = resultDt.NewRow();
        dtRow["uri"] = ((Note_)item).ID;
        dtRow["title"] = ((Note_)item).title.ToString();
        dtRow["date"] = (DateTime)(((Note_)item).dateOfCreation);

but, the value of part '((Note_)item).dateOfCreation' is different from the RDF value. For the above example they are:

title: Test 2
value: 2008-09-09T17:48:35Z
title: Test1
value: 2009-03-29T01:28:31Z
alt text http://img37.imageshack.us/img37/6489/26739420.jpg

Am I making any mistake in this progress?
Thank you in advance

Was it helpful?

Solution

Your question does not show any inconsistency on the datetime. The debugger screenshot window shows exactly the same datetime as in the RdfDocument above.

However, you might experience datetime issues due to your computer's regional settings. If it is so, then this is a general issue that has nothing to do with ROWLEX. Calculating the correct datetime is not a trivial thing, it depends a lot on your region, your timezone, even on your shoesize :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top