Roundup Tracker - Issues

Issue 1429390

classification
Problem with dates in journal entries.
Type: Severity: normal
Components: Web interface Versions:
process
Status: closed fixed
:
: richard : richard
Priority: normal :

Created on 2006-02-10 21:17 by anonymous, last changed 2006-02-10 21:17 by anonymous.

Messages
msg2152 Author: [hidden] (anonymous) Date: 2006-02-10 21:17
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
2006-02-10 21:17:49anonymouscreate