#127 dateTime objects must be timezone-aware

PyXB 1.1.4
closed
None
fixed
Binding model
major
PyXB 1.1.3
defect
2012-02-26
2012-02-25
No

Per http://www.w3.org/TR/xmlschema-2/#dateTime, all XML timezoned values are in UTC. To prevent confusion with Python, which has a concept of "naive" date/time values for which zone information is unavailable, PyXB should enforce the presence of a tzinfo field with zero minute offset in all timezoned instances.

Discussion

  • Peter A. Bigot

    Peter A. Bigot - 2012-02-26
    • status changed from new to closed
    • resolution set to invalid

    That was a misinterpretation: true that all timezoned instances are in UTC, but XML still recognizes non-timezoned times that correspond nicely to Python's naive times.

     
  • Peter A. Bigot

    Peter A. Bigot - 2012-02-26
    • status changed from closed to reopened
    • resolution invalid deleted

    Yes, it should be enforced in all timezoned instances, and the non-timezoned instances left with no tzinfo field.

     
  • Peter A. Bigot

    Peter A. Bigot - 2012-02-26
    • status changed from reopened to closed
    • resolution set to fixed

    commit 048b9d2e81ab17447e2bd89cdb0d328d163c1d46
    Author: Peter A. Bigot <pabigot@‌>
    Date: Sun Feb 26 07:27:13 2012 -0600

    trac/127: dateTime objects must be timezone-aware

    Eliminate hasTimeZone in favor of a non-None tzinfo field in the underlying
    datetime instance. The tzinfo instance should always be zero-offset from
    UTC.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks