I have a field for a layer in QGIS that is a Date/Time widget type. I want to save date time automatically with custom format yyyy-MM-ddTHH:mm:ss. Default value set to now(). The project is packaged for QField with QFieldSync.
When setting a point on the tablet (Samsung Active 4) the Date/Time at first appear, although the time is ~6 hours ahead. After submitting the date is retained but time reads all zeros.
I have spent too much time on this problem and have yet to discover how to format this field correctly. I would be grateful for any help.
Field formatted in QGIS
Entering a new point in QField, the time appears but is several hours ahead
Editing the point in QField, the date is retained but time is all zeros
I have a field for a layer in QGIS that is a Date/Time widget type. I want to save date time automatically with custom format yyyy-MM-ddTHH:mm:ss. Default value set to now(). The project is packaged for QField with QFieldSync.
When setting a point on the tablet (Samsung Active 4) the Date/Time at first appear, although the time is ~6 hours ahead. After submitting the date is retained but time reads all zeros.
I have spent too much time on this problem and have yet to discover how to format this field correctly. I would be grateful for any help.
Field formatted in QGIS
Entering a new point in QField, the time appears but is several hours ahead
Editing the point in QField, the date is retained but time is all zeros
I detected exactly the same behavior as you described above. My solution was checking the field type again and enusre your field type is DateTime instead of Date. Now your time can be stored as well.
Unfortunately, you cannot change the type of a field within the existing layer. You can either create a new field or change the field type with the function refactor fields.