Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR will close #225
Description
This change helps to make the DB backend become more aligned with the ICAT backend by having timezones when displaying datetimes on the API.
It seems the DB backend doesn't actually use timezones anywhere - I tried setting the
timezone
flag as pointed out in the docs but that didn't have any impact. Instead, I've made the DB backend display the local timezone for the API. This seems to be the best compromise I could find to make the two backends aligned.The DB backend now uses the
DateHandler
so will have the same format for datetimes as the ICAT backend.I also noticed that the get session details endpoint doesn't use timezones on the ICAT backend. I fixed that on 9b2dc7d.
Testing Instructions
Check that both backends have display datetime in the same format (including the timezone part of the output)
Agile Board Tracking
Connect to #225