title: ontology- Storing Java Date in XMLSchema#dateTime
body: <p>I created a File System ontology in protege. I have set range of file created date as dateTime, as depicted in below code.</p>
  
  <pre><code>&lt;owl:DatatypeProperty rdf:about="http://www.semanticweb.org/administrator/ontologies/2014/2/untitled-ontology-5#created"&gt;
    &lt;rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#dateTime"/&gt;
    &lt;rdfs:domain rdf:resource="http://www.semanticweb.org/administrator/ontologies/2014/2/untitled-ontology-5#File"/&gt;
    &lt;rdfs:comment&gt;Time when the file was last accessed.&lt;/rdfs:comment&gt;
    &lt;rdfs:label&gt;fileLastAccessed&lt;/rdfs:label&gt;
  </code></pre>
  
  <p></p>
  
  <p>in date create property I am storing java date <code>Date date = new Date();</code> (after casting to String)</p>
  
  <p>it store correctly as:</p>
  
  <pre><code>&lt;File rdf:about="http://www.semanticweb.org/administrator/ontologies/2014/2/untitled-ontology-5#8117c6b9-3db8-4ab9-8de4-ba67f52ac615"&gt;
  &lt;created&gt;Wed Apr 16 14:37:30 PKT 2014&lt;/created&gt;
  &lt;hasPath&gt;/Documents/Untitled Document 5&lt;/hasPath&gt;
  </code></pre>
  
  <p></p>
  
  <p>My question is that: is it safe / correct way to store java Date in <code>XMLSchema#dateTime</code> ?</p>
  
  <p>Am I doing it correctly or wrongly? </p>