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

Terria not respecting timezone returned by THREDDS WMS GetCapabilities #7143

Open
sppigot opened this issue May 6, 2024 · 1 comment
Open

Comments

@sppigot
Copy link
Contributor

sppigot commented May 6, 2024

THREDDS returns information about the time range of the data being displayed in the WMS (including the time zone - which in this case is Etc/UTC) in the GetCapabilities call:

ThreddsWMSTimeZone

Terria uses this information to populate the timeslider and the time selector for the WMS item in the workbench:

TerriaTimeBarInLocalTimeZone

Unfortunately when Terria uses this time information it changes the timezone to the local time zone of the web browser (see circled values in the image above). This is confusing for users and may lead to issues especially when these times are used in a WPS call. The issue can be worked around by changing the timezone that the browser thinks it is running in - however this is awkward and clumsy and not something that the average user can and should have to do. I think Terria should use the timezone information supplied by THREDDS for the time slider and time selectors and not attempt to convert them to the local timezone.

May have implications for #6895 - thanks @sixlighthouses !

@nf-s
Copy link
Contributor

nf-s commented May 7, 2024

Hi @sppigot

I believe THREDDS (and GeoServer) will always return dates in UTC - so I don't think we can default to showing the timezone returned by those services. Generally speaking, most users want to see local timezones in Terria.

From #6968 (comment)

Terria will render dates in your local timezone - this is the default behaviour for handling dates in web browsers.

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"

We were discussing this a few months ago

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants