Project

General

Profile

Task #2098

Feature #1764: Finalize dataoneTypes schema for public release

Types.DateTime: Correction related to Python implementation

Added by Roger Dahl over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Documentation
Target version:
Start date:
2011-12-07
Due date:
% Done:

100%

Milestone:
CCI-1.0.0
Product Version:
*
Story Points:
Sprint:

Description

This paragraph is not really correct: Implemented in Python using the datetime.datetime class, which is also used for serialization and deserialization through Pyxb.

PyXB serializes and deserializes to the XML DateTime format and not all of our Types.DateTime formats conform to the XML DateTime (which is another ISO8601 subset). So, on the Python side, we use datetime.datetime just to represent datetimes internally and a library called iso8601 to serialize and deserialize to Types.DateTime and PyXB for the XML representation.

So, I think we should include something stating that not all serializations of Types.DateTime that we support are compatible with XML DateTime, and I don't think we need to mention datetime.datetime for Python, that's just an implementation specific internal representation. But it may be useful to point people towards the iso8601 library and PyXB for handling Types.DateTime in Python.

History

#1 Updated by Matthew Jones over 12 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Updated DatTime docs to properly refelct our decision to use two DateTime syntax representations in different scenarios:

-- in XML and URLs, use XML Schema xs:dateTime compliant values
-- in HTTP headers, use HTTP Full DateTime format (RFC 1123)

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 14.8 MB)