Roundup Tracker - Issues

Message2152

Author anonymous
Recipients
Date 2006-02-10.21:17:49
Message-id
In-reply-to
I created a new class called release.  Release has one
property called release_date.  I am populating two rows
of releases in my initial_data.py.  For this date
field, I am calling the Date function to format the
date.  If I go into the release, the date shows a day
earlier (because my time zone is -5).  So I changed the
initial_data.py to be a day later so that it will show
up correctly in the forms.  If I hit submit changes
without changing anything, it still thinks the date has
changed.  The problem is that the date that gets stored
in the journal has 0.000 for the seconds.  When I try
to re-query this same release, I get an error.  I don't
have the trace right now to show.  But to get around
this I made three minor changes in rdbms_common.py and
date.py.

rdbms_common.py
723c723
<         hyperdb.Date   : lambda x: x.formal(sep=' ',
sec='%.3f'),
---
>         hyperdb.Date   : lambda x: x.formal(sep=' ',
sec='%06.3f'),

This fixed the problem but I went ahead and made a
similar change in date.py

date.py
394c394
<         return '<Date %s>'%self.formal(sec='%f')
---
>         return '<Date %s>'%self.formal(sec='%06.3f')
411c411
<         return '%4d%02d%02d%02d%02d%f'%(self.year,
self.month,
---
>         return
'%4d%02d%02d%02d%02d%06.3f'%(self.year, self.month,

These changes make sure that the seconds come out as
two digits.  I probably could have fixed the date
checker to handle 1 digit seconds, but this was easier.

My email is David.Byrne@cambridge-na.com

Thanks,
David Byrne
History
Date User Action Args
2009-02-03 14:21:37adminlinkissue1429390 messages
2009-02-03 14:21:37admincreate