Improved date and time support

July 10th, 2005 at 9:23 am (3 years ago) by Andi Vajda under chandlerdb

Until recently, date and time value support was implemented in the data model with the help of Egenix’ mx extensions library. With the Python 2.3 release, new types for date and time values were introduced. The repository now makes use of them.

The repository’s data model now implements date and time support around Python’s datetime module. Support for time zones was added by leveraging IBM’s ICU library which is wrapped for use from Python by the PyICU extension library. PyICU exposes ICU time zones via the ICUtzinfo class which implements the datetime module’s tzinfo protocol for use with datetime and time types.

The data model supports the following types:

  • Date
    for objects containing date information.
  • Time
    for objects containing time information, with or without a time zone.
  • DateTime
    for objects containing both date and time information, this type can be also be used with or without a time zone.
  • TimeDelta
    for representing a time difference.
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Reddit

Leave a Reply