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

Standardize timezone of datetime responses #288

Closed
ml-evs opened this issue Jun 5, 2020 · 2 comments
Closed

Standardize timezone of datetime responses #288

ml-evs opened this issue Jun 5, 2020 · 2 comments
Assignees
Labels
bug Something isn't working schema Concerns the schema models
Projects

Comments

@ml-evs
Copy link
Member

ml-evs commented Jun 5, 2020

Currently we return timezone specific date times, but the spec mandates RFC 3339 (i.e. with "Z" "2007-04-05T14:30Z").

Spec definition:

https://github.com/Materials-Consortia/OPTIMADE/blob/develop/optimade.rst#last-modified

This will probably require tweaking the pydantic Config of the particular datetime properties.

@ml-evs ml-evs added bug Something isn't working schema Concerns the schema models labels Jun 5, 2020
@ml-evs ml-evs added this to To do in CECAM 2020 via automation Jun 5, 2020
@fekad
Copy link
Contributor

fekad commented Jun 9, 2020

There is a tiny mistake in the specification: the second is missing from the example which is required for the RFC3339 format. If I understand to have a "precise" definition was the main reason to switch from ISO 8601 (Materials-Consortia/OPTIMADE#145)

About the implementation:

  • Do you want to define the timezone as a variable in the CONFIG or
  • Do you want to use the computer's timezone settings or
  • Do you want always to use UTC (with Z" at the end)?

As far as I can see eg. COD always shows UTC...

@CasperWA CasperWA self-assigned this Jun 11, 2020
@CasperWA
Copy link
Member

In discussion, we'll go for the third option, always using UTC.

@CasperWA CasperWA assigned fekad and unassigned CasperWA Jun 11, 2020
@fekad fekad closed this as completed Jun 15, 2020
CECAM 2020 automation moved this from To do to Done Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working schema Concerns the schema models
Projects
CECAM 2020
  
Done
Development

No branches or pull requests

3 participants