Increase resolution of timestamp

Niels Göran Blume created the topic: Increase resolution of timestamp

Hey everyone !!

First of all, thanks to Web Dorado for the the FormMaker...
We needed a very simple signup system, but with a waiting list and no emails involved.
That's exactly what we were able to setup within 10 min, as opposed to hours trying to make something like that with for example Event Espresso...

My question now is related to the time resolution of the "Submit date" info in submissions.
By looking at the values in the database for this columns and the column definition in MySQL, it appears that this is generated in code and not automatically filled by MySQL during the INSERT.
Is there an easy way to increase this to sub second resolution?
I'm asking, since there is a chance that our signup system might be accessed quite heavily at at specific time and sub-second resolution might be necessary to order submissions by time. I just want to be on the safe side....

Thank you !!!

Cheers
Niels

P.S.: I kind of was worried, the system didn't work at first, because no submissions were showing up under submissions. Turned out, you need to select a specific form to see any submissions at all. Maybe it is helpful to show the last 25 submission across all forms if no form is selected...
I would like that very much :cheer: :cheer:

#83581

Please Log in or Create an account to join the conversation.


Niels Göran Blume replied the topic: Increase resolution of timestamp

Hello,

some more details I have been able to find myself since posting...
It appears, that the $date variable, which is inserted into the database afterwards, is set to a $_POST value, indicating, that the value is already generated before submitting the form (in admin/controllers/FMControllerSubmissions_fm.php).

$date = esc_html($_POST['date']);
In my understanding, that leaves me with two options:
Overwriting $date in the PHP script on the server with a more precise timestamp or generating a more precise timestamp when assembling the $_POST infos.
I'm not sure, which way is better. The overwriting in PHP on the servers seems to be easier and forcing all timestamps to server time. Not sure, if that is the case with assembling the timestamp before $_POST.

Any recommendations or ideas would be greatly appreciated !!

Thanks!

Cheers
Niels

#83611

Please Log in or Create an account to join the conversation.


Agapi G. replied the topic: Increase resolution of timestamp

Hello Niels!

Thanks for posting your question!

Please note, that the date is generated with code, since each field of a form is kept as a separate database row. This way they all will have the same submit date. But causing database overloads by this date entry is hardly possible, so don't worry about it.

As for your second post, please note, that /admin/controllers/FMControllerSubmissions_fm.php file controls submission editing process from WordPress dashboard. In case you need the file for saving the data, it is /frontend/models/FMModelForm_maker.php.

Feel free to let me know in case you have other questions.
Thank you! Have a good day!


Kind regards,
Agapi G.
Web-Dorado team
#83649
The following user(s) said Thank You: Niels Göran Blume

Please Log in or Create an account to join the conversation.


Niels Göran Blume replied the topic: Increase resolution of timestamp

Dear Agapi G.,

thank you for your reply.
That clarifies, why I was getting errors in the backend when working in /admin/controllers/FMControllerSubmissions_fm.php.

I tried changing the database format to datetime(6), so that it would actually save sub-second information in that column (without the change in table structure, it appears to ignore a high resolution timestamp).
That caused the backend to fail, so I changed it back.
We will give the second resolution version a try and see how that goes.
If we need sub-second resolution, I will get back to you and try it in more detail.

Thanks !

Have a nice weekend!
Niels

#83779

Please Log in or Create an account to join the conversation.


Agapi G. replied the topic: Increase resolution of timestamp

Hi Niels!

Please do let us know about the results after you test this. Also, feel free to ask questions, in case you have any.
We'll be happy to assist!

Have a wonderful weekend too!
Cheers!


Kind regards,
Agapi G.
Web-Dorado team
#83787

Please Log in or Create an account to join the conversation.


Time to create page: 0.189 seconds
Powered by Kunena Forum

WORLD-CLASS SUPPORT

We are here for you every step of the way. Turn to our support with any questions you might have about our products and services. Our experienced customer care team is available to help you as fast as we possibly can.

Contact us