FeatureEditor date-time

28 views
Skip to first unread message
Assigned to lorenzo...@geosolutionsgroup.com by me

Mid Al

unread,
May 23, 2025, 4:20:43 AMMay 23
to mapstore-developers
FeatureEditor shows wrong value for hour. For example: 
- in db table value is: 2025-05-10 10:45:46+02
- when i click on info it shows:  2025-05-10T10:45:46+02:00
- on geoserver info it is correct value too
- even on network tab (when open featureeditor) it returns correct: 
2025-05-10T10:45:46+02:00
- only in feature editor value is wrong: 2025-05-10T08:45:46Z   (2 hours less).
I tried insert with time zone, and without time zone, but it's always the same.

Does anyone have any idea what to do?
featureeditor_datetime1.png

Lorenzo Natali

unread,
May 27, 2025, 3:44:42 AMMay 27
to mapstore-developers
Hi,
Z stands for GMT, so it looks correct. the WFS froom Geoserver works on this way.
I see there is a property "dateFormats" that you can use, but I never used it, so I don't know.
Here the documentation: 
"dateFormats": {
   "date-time": "MM DD YYYY - HH:mm:ss",
   "date": "MM DD YYYY",
   "time": "HH:mm:ss"
}

Mid Al

unread,
May 27, 2025, 10:01:32 AMMay 27
to mapstore-developers
Hi,
thank you for answer.
DateFormats works well, but it is only for formatting.
My problem here is value, featureEditor shows 08:45:46, while info window (Identify) shows 10:45:46 (the same as original value in db table, correct)
It's confusing for users, and the reason they complain.
There must be a way to harmonize these two values...

Lorenzo Natali

unread,
Jun 3, 2025, 4:07:11 AMJun 3
to mapstore-...@googlegroups.com
Hi,
This is a thing that regards more GeoServer than MapStore itself.
MapStore is not aware of the timezone of the server, and WFS returns UTC date format(with Z) by default.
MapStore can format dates, but as you see it is a sort of workaround.
You can play with this maybe, to see if you can fix your problem

Please let us know if this helps with your problem

--
You received this message because you are subscribed to the Google Groups "mapstore-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-develo...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/mapstore-developers/5fa417ff-31e2-42ff-9a0a-5a3b25df829fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages