my problem is still the same (I have posted before).. I found a solution but it's not nice and I would love to get an insight why this doesn't work as one would expect.
So, here's the setup. I have a component, where in the backend record editing form, there's a date picker. This date is a varchar field in the database and I would like to leave it so before I break a 1000 more things.. The proper format this date initially gets saved in in the frontend is YYYY-mm-dd. In my administrator/components/mycomponent/models/forms/tralala.xml the field is type calendar. I set the format attribute, the showtime attribute, tried even the translateformat attribute, to all combinations but joomla ALWAYS saves the date with the trailing time portion which is always 00:00:00. The joomla docs about the calendar form field says:
Well it certainly doesn't record the time properly but still puts that time portion in there.This for some reason messes up the dates as soon as i set the server timezone to something else than UTC.note that the format string must include time fields for the time to be recorded
Why this behavior? Is there any way of changing it without overriding the whole save procedure in mycomponent/controllers/tralala.php or what i did (coz i don't want to mess with the original save function and don't even know where to look for it to be able to copy it to my override and change only the part i need to), which is call
Code: Select all
parent::save();
Thanks...