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

Data request display does not handle time zones properly #53

Open
ThrawnCA opened this issue Apr 29, 2020 · 0 comments
Open

Data request display does not handle time zones properly #53

ThrawnCA opened this issue Apr 29, 2020 · 0 comments

Comments

@ThrawnCA
Copy link

ThrawnCA commented Apr 29, 2020

Data requests are displayed with inaccurate "Created" strings, eg "-1 days ago".

This appears to result from a lack of time zone handling. actions.py populates the creation timestamp without specifying a time zone, but when it is rendered, it uses a localisation method (formatters.localised_nice_date) that assumes a lack of time zone data means UTC.

Either the time zone should be specified when first creating the data request, or else the current server time zone (eg from helpers.get_display_timezone()) should be assumed when displaying it. The latter approach would also resolve existing data requests.

This is similar to ckan/ckanext-xloader#102

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

1 participant