Skip to content

Date shown in 'Time selector' is shifted one day #6968

Answered by nf-s
iamsaswata asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @iamsaswata

The times provided by your GeoServer are most likely in UTC, but Terria will render dates in your local timezone - this is the default behaviour for handling dates in web browsers. This is why you are seeing a different date between the date/time selector - and the time value sent to your GeoServer.

If you want to display UTC times in the Terria UI - you can use the dateFormat configuration option.

For example - if you put UTC: before your format string, then the date will be shown in UTC instead of your local timezone

"dateFormat": "UTC:dd/mm/yyyy"

Let me know how you go!

Thanks 🙂

Replies: 7 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by nf-s
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #6948 on November 10, 2023 03:32.