You asked about a form displaying the date/time. That's what I presented.
Yes, there can be and will be a gap between form presentation and the time it really gets entered in the db. If you are lookinig for the actual db time when entered, use the timestamp data type in the db and don't include it in the sql statement. There really is no need to show the current time to the user.
Note that users in different time zones would get the local SERVER time, not their local time without some tweaks...