[Zope] how to use datetime?

Ben Avery ben@thesite.org
Thu, 14 Nov 2002 11:46:53 +0000


jonatan,

there are some examples here:
http://zdp.zope.org/projects/zsnippet/snippets/DTMLTags/ZTformatting
it's in a DTML context, but the code is all python

also, have a look at the source code to see how it works
[zope root dir]/lib/python/DateTime/DateTime.py
and the documentation
[zope root dir]/lib/python/DateTime/DateTime.html

you can find it in the CVS tree if you can't get access to the source:
http://cvs.zope.org/~checkout~/Zope/lib/python/DateTime/DateTime.html

hope this helps

ben


jonatan wrote:
> hi,
> 
> i've been sweating with datetime objects the whole day, but still cant
> figure out some simple things:
> 
> - documentation ? only in the zope api reference?
> - how do i make a datetime object which is now+2 hours?
> 
> i'm sure there is a simple way,  ... like DateTime()+2 which would be
> great if i could add hours, minutes or seconds so easy ...
> 
> 
> thanks for the help
> 
> 
> jonatan
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>