can't record the time with the date element

jfquestiaux

Well-Known Member
I know how you hate to work on the date element but I noticed that since I am using fabrik 3.1, I can't record the time with the date elements.

I made some test :

  • The default setting for the formatting with the date element (when you create a new list for instance) is (in the form) "Y-m-d H:i:s" which records (for today) "2013-02-12 00:00:00", which is somewhat correct since "H:i:s" is a wrong formatting anyway;
  • Trying "Y-m-d T" records "2013-02-11 23:00:00" which is correct for the date since I am on GMT +1, but gives no time.
  • Trying "Y-m-d H:M:S" records "2013-02-12 11:00:00", which is the closest: "11" is correct since I made my test between 12:00 and 13:00 and I am on GMT +1 but no minutes/seconds
  • Finally, trying "Y-m-d X" records also "2013-02-11 23:00:00"
Not a critical issue, but at some point it would be nice to be able to record the time.
 
The default setting for the formatting with the date element (when you create a new list for instance) is (in the form) "Y-m-d H:i:s" which records (for today) "2013-02-12 00:00:00", which is somewhat correct since "H:i:s" is a wrong formatting anyway;

In joomla 3 the date objects format has change from using the strftime format to the date objects format: http://www.php.net/manual/en/function.date.php

So if I do a test:

Code:
$date = JFactory::getDate();
echo $date->format('Y-m-d H:i:s');
>>>>>>
2013-02-14 10:33:30

Trying "Y-m-d T" records "2013-02-11 23:00:00" which is correct for the date since I am on GMT +1, but gives no time.
'T' is the format for the timezone abbreviation? Not sure that that's going to work

I did a test with the default date element's settings (with the time shown) and things record correctly form me,.
 
hi rob.

i'm running into this problem also. what i'm seeing is that if i have the "time" selector enabled then it will save the date and time entered in "time" selector. however, with only the date enabled, but no "time" selector enabled AND when the "time" selector is enabled but made not accessible (aka they can't pick their own time) then saving a record will default the time to 00:00 even if a time was specified in the date box.

in the old version of fabrik, I was able to turn off the defaults and do enable eval:
return date('Y-m-d H:i:s');
which saved the date the form was submitted, but in latest from github the eval doesn't work either. the time specified is simply ignored no matter what unless the 'time' selector box has been enabled and a time was specified in that (and that's not ideal).
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top