Why datetime module is so complicated?

Zeynel azeynel1 at gmail.com
Sun Nov 14 11:14:21 EST 2010


It's about a week now I've been trying to convert a datetime object to
seconds since epoch; the object is set to current time by class Rep()
in Google App Engine:

class Rep(db.Model):
    ...
    mCOUNT = db.IntegerProperty()
    mDATE0 = db.DateTimeProperty(auto_now_add=True)
    mWEIGHT = db.FloatProperty()

I want to divide mDATE0 by the integer mCOUNT. I asked the same
question here previously and also at stackoverflow. So far, I still
cannot make it work. I would greatly appreciate if someone who is an
expert in datetime operation in Python could help me understand this
issue. Thank you.

Latest question in Stackoverlow with link to my original question
there: http://stackoverflow.com/questions/4178125/datetime-and-utctimetuple

Previous discussions at comp.lang.python:

http://groups.google.com/group/comp.lang.python/browse_frm/thread/ac9a2c89bed67869/28c7c7b8d48f3805?hl=en#28c7c7b8d48f3805

http://groups.google.com/group/comp.lang.python/browse_frm/thread/a5aeb6c40ae08450/fd9b42e0c403380e?hl=en#fd9b42e0c403380e



More information about the Python-list mailing list