Store the date as a timestamp
|Reported by:||Ryan J Ollos||Owned by:||Robert Corsaro|
|Severity:||normal||Keywords:||date time storage value|
|Cc:||Chris Nelson, Steffen Hoffmann, Patrick Schaaf, Matoba Akihiro||Trac Release:||0.11|
I made the bad assumption that the date was being stored as an integer, as Trac does for Milestone's
completed fields. A problem can occur if you change the
separator or date
format after some data has been entered; the database now has different formats for the date in its row. Here is an example:
This also makes it more difficult for other plugins to query and do something useful with the data because they need to get the
format from trac.ini. Storing the value as an integer would also make comparisons possible, which would help with implementing features such as #6410.
I'm wondering what led to the design decision to store the field as text. Do you see any downsides to storing it as an integer?