View Issue Details

IDProjectCategoryView StatusLast Update
0003352OXID eShop (all versions)4.07. Source code, Testpublic2012-12-10 13:44
Reportercsimon Assigned To 
Status resolvedResolutionfixed 
Fixed in Version4.7.1 / 5.0.1 revision 52468 
Summary0003352: oxarticles and oxtimestamp are always formatted dates
DescriptionIn oxarticles::load oxid does the following:

        $this->oxarticles__oxinsert = new oxField(oxUtilsDate::getInstance()->formatDBDate( $this->oxarticles__oxinsert->value));
        $this->oxarticles__oxtimestamp = new oxField(oxUtilsDate::getInstance()->formatDBDate( $this->oxarticles__oxtimestamp->value));

this is wrong, because it sets the field to a formatted date, but at least the rawValue should be an unfomatted raw value.

IMHO there shouldn't date formatting at all, because the shop doesn't do that for other fields which could be formatted. Also this is kind of oxids ORM, it should always contain data equal to the data in the database.
Additional InformationThis functionality should be put in special functions, like the formatting of prices is in "getFPrice". E.g. there should be some function named "getFInsertDate" or "getFTimestamp".
TagsNo tags attached.
PHP Versionany
Database Versionany


Linas Kukulskis

2012-11-16 14:51

reporter   ~0007886