• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

date element has stopped storing time correctly, always 00:00:00. changed recently

skyrun

Active Member
posted to an existing report of this that was on the community forum, putting here so you can see it on the professional forum.

of my new new form rows are timestamped 00:00:00 now. the date works, but the time is always 00:00:00. just started happening recently post-1/3/19 at least.

i am using a 'hidden' date element (not timestamp element type) with Default to current date = Yes and Always return current date. = No. note in case it matters for debugging that i also use 'local time' for all of my date/times (NOT UTC).

***looking at another forum item, when i put in h:i:s on the form format, it puts in 12:00:00 so 12pm vs. the default H:i:s which puts in 00:00:00. so changing H to h does do something if that's a clue.

I tried setting the default in the db to CURRENT_TIMESTAMP and fabrik is overriding it and storing with 00:00:00 or 12:00:00. (tried advanced formats = yes also on the advanced tab).

The 'workaround' i found is to select Always return current date. = Yes. when i set it this way, the time works correctly on both new and edit.

But i would like to be able to set Default to current date = Yes and Always return current date. = No to record when the row was created (not edited) and that has stopped working as far as the TIME goes.
 
Last edited:
update: it also works if i make the Hidden = NO (and change it to 'nobody' for editing and/or details) as a way to hide the date. so it only seems to happen incorrectly with these settings:

hidden = yes
default to current date = yes
Always return current date = no
access for editing = public

when i change hidden = no (and access = nobody) then it works ok
or if i use the option to always return current date = yes, then it works ok even hidden (but changes on every edit vs. just creation).
 
I think this is related to the new jdate element and the new "time picker" in the old date element.

The date part field is ignoring any time typed in it. You must set "show time picker" = yes to get a time field (where you can type or use the time picker).
Which is not backward compatible: open and resave a record with a date element without time picker and your existing time is lost:(
 
i would think it is a very common use-case to have a date_time that records when a record is created (but is not shown). we 'just' need it to be left alone if it's not changed (including if it's hidden).

fyi, i tried with time selector turned on and that didn't fix it either. the only thing that fixed it was to make it NOT hidden and change the access so it didn't show (ie hide it that way vs. using 'hidden=yes'). so i changed all of mine to work that way (on almost 100 tables with the std date_time as a column where i recorded it and showed it on the list, but not on the form)

wouldn't you agree this needs to be fixed?
 
Yup, I'm working on it.

It's a bug that got introduced when I did a large refactoring of the date elements recently, finally getting the new J! date widget integrated (into the new jdate element) and fixing the dismal time selector in the original date element. But the latter involved changing how we handle the time format handling, and some problems crept in. Unfortunately it's some changes that absolutely had to happen, that I've been putting off since J! 3.7.2.

I think one fix would be to use jdate instead of date elements, and I'm about to redo our default list element types to use that instead of date, where the time format handling is (relatively) unchanged.

-- hugh
 
hidden = yes
default to current date = yes
Always return current date = no
access for editing = public

when i change hidden = no (and access = nobody) then it works ok
It's still the same with current GitHub
 
I can't use jdate as long as it doesn't support "allowed dates".

Unfortunately, unless I add it to the J! date layout code, and a PR gets accepted by the J! gods (which is ... not likely), it'll never support allowed dates. That was a feature specific to the old 3rd party date widget, that didn't get carried forward into the new J! specific code.

Which is one of the main reasons I created 'jdate' as a new element, and left the old 'date' element there, which we'll support as long as practical - but the version of the 3rd party widget it uses (DHTML calendar) is old and creaky (pretty much unchanged for as long as I've been using Joomla). There is an "all new" version, but it'd need a lot of work to support.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top