[Zope-DB] Date Structures
Matthew T. Kromer
Tue, 30 Oct 2001 14:32:38 -0500
Lindstrom Greg - glinds wrote:
>I have started learning Zope and web design, and so far love what I see. I
>am creating a fairly simple web application to track activity of our
>volunteer fire department and would to know where I could get
>information/examples of what is available in various databases for Date/Time
>structures? I am assuming there is a standard Date/Time data structure in
>SQL? Is it accessible via Zope? Any links/books/tips you care to pass on
>would be gratefully appreciated!
What I originally thought was going to be an easy answer may not be!
Zope uses a Zope DateTime object to record time information. This
information is usually changed to a database-dependant format on storage
to an RDBMS, and converted the other direction on retrieval.
However, a lot of people like storing timestamps or other data and doing
an explicit conversion, to avoid certain ambiguity problems.
Mostly, the Zope DateTime object will try to do the right thing, so you
can use it with SQL methods and so on.
Also, consider using something like the Zope calendar tag, which is a
contribution up on www.zope.org. The calendar tag will help you present
calendar-oriented data. You can use information that the tag helps
generate to form a SQL query or otherwise retrieve date-oriented data
from a storage.