... these weird formatted varchar values are badly chosen.
We should either store a timestamp, or, even better (but maybe MySQLspecific, I am not sure) as datetime.

Can anyone comment on why this weird format was chosen? And if we want to move to a native time-storage?

If people agreee, I have some code for this, but need to clean it out, since I hacked up date beyond recognition :)

Comments

KarenS’s picture

Using native date storage methods won't work reliably across databases and we can't use mysql-specific storage methods. If you prefer a timestamp, that option is already available and doesn't require any patches to work. The iso format has been used from the beginning by cck and is used by the date module that is still included with the cvs version of cck. It has its own benefits/disadvantages (i.e. the ability to store partial dates, like year only or year and month only). A discussion of the formats and the benefits and disadvantages of each is in admin/help.

I am really not interested in changing the storage methods since it will break many things in the module and I have already invested hundreds of hours into this. In spite of that, if there is a lot of agreement that something different should be done and a consensus on what it should be, and people have thoroughly examined what is available now and decided it will not work, I would make changes.

KarenS’s picture

Also, it would take patches to cck core to use native database storage methods since that is not even an option as it stands. The currently supported column types are 'integer', 'bigint', 'mediumint', 'tinyint', 'float', 'varchar', 'text', 'mediumtext', 'longtext'. Adding other column types would require changes in several places in cck core, including making sure that the column types are mapped correctly for postgres (and any other databases that are going to be supported).

Bèr Kessels’s picture

It is rather weird to have to choose what storage type you want by selecting a widget. But it does solve this issue, of storing the data in a usable (in PHP) format.

Bèr Kessels’s picture

Status: Active » Closed (works as designed)