Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem in FeatureEditor displaying wrong datetime on fields #10754

Open
1 task done
MV88 opened this issue Jan 14, 2025 · 0 comments · May be fixed by #10760
Open
1 task done

Problem in FeatureEditor displaying wrong datetime on fields #10754

MV88 opened this issue Jan 14, 2025 · 0 comments · May be fixed by #10760
Assignees
Milestone

Comments

@MV88
Copy link
Contributor

MV88 commented Jan 14, 2025

Description

on mapstore 2023.02.01 with docker, they're getting some problems with values of datetime fields
It seems it's ignoring the local TimeZone using instead UTC, as you can see at the following screenshot:

image

That map is based on a context where they have set date format on Attribute Table component as:

image

{
"name": "FeatureEditor",
"cfg": {
    "dateFormats": {
      "date-time":  "DD/MM/YYYY HH:mm:ss",
      "date": "DD/MM/YYYY",
      "time": "HH:mm:ss"
    }
  }
}

and on docker container they have environment variable set as "TZ=Europe/Madrid"
They have checked that date on container is correctly displayed in local time.

How to reproduce

Expected Result

Current Result

  • Not browser related
Browser info (use this site: https://www.whatsmybrowser.org/ for non expert users)
Browser Affected Version
Internet Explorer
Edge
Chrome
Firefox
Safari

Other useful information

I identified where the issues relies for rendering part
even if we set a format without the Z from UTC it still gets applied here

I guess that we can work on this function to ignore utc via a new config or if dateFormats is defined in FeatureEditor plugin and it does not contain utc Z value we simply avoid using utc conversion here

Then we have to handle this in DateTimeEditor and DateTimeFilterRenderer and DateTimePicker

@MV88 MV88 added this to the 2025.01.00 milestone Jan 14, 2025
@MV88 MV88 self-assigned this Jan 14, 2025
MV88 added a commit to MV88/MapStore2 that referenced this issue Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant