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

Баг: неверный формат даты в эндпоинте /feed.json #1110

Closed
weazyexe opened this issue Jun 24, 2023 · 3 comments · Fixed by #1119
Closed

Баг: неверный формат даты в эндпоинте /feed.json #1110

weazyexe opened this issue Jun 24, 2023 · 3 comments · Fixed by #1119
Labels
approved 👍 Feature or proposal was approved by maintainers and waiting for implementation

Comments

@weazyexe
Copy link

weazyexe commented Jun 24, 2023

Клуб поддерживает выдачу постов в формате JSON Feed, но в полях date_published и date_modified дата лежит в неверном формате.

Спецификация JSON Feed: https://www.jsonfeed.org/version/1/

Шаги к воспроизведению:

  • Дёрнуть https://vas3k.club/feed.json
  • Смотрим на массив items, у айтема поля date_published и date_modified

Текущее поведение:

  • Дата формата yyyy-MM-ddTHH:mm:ss.SSS (пример 2023-06-24T15:17:25.207755)

Ожидаемое поведение:

  • Дата в формате стандарта RFC 3339 yyyy-MM-ddTHH:mm:ssX (пример 2023-06-24T15:17:25Z или 2023-06-24T18:17:25+03:00, как удобнее будет, в целом это один стандарт)
@vas3k
Copy link
Owner

vas3k commented Jun 26, 2023

Хороший баг, надо фиксить

@igoose1
Copy link
Contributor

igoose1 commented Jun 26, 2023

Прикреплю еще результаты jsonfeed validator:

https://validator.jsonfeed.org/?url=https%3A%2F%2Fvas3k.club%2Ffeed.json

Помимо проблем с датами, иногда content_text = null.

@skywinder skywinder added the approved 👍 Feature or proposal was approved by maintainers and waiting for implementation label Jun 26, 2023
@vlle
Copy link
Contributor

vlle commented Jun 29, 2023

попробую взять на себя ишью, вроде нужно поправить формат конвертации в post.to_dict всего лишь

vas3k added a commit that referenced this issue Jun 30, 2023
…x) (#1119)

* fix: add rfc3339 support to feed.json (and content_text visibility fix)
resolve #1110

fix: rework post.to_dict, remove extra variables in test_api

* fix: remake private content_text placeholder

Co-authored-by: Vasily Zubarev <[email protected]>

---------

Co-authored-by: Vasily Zubarev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved 👍 Feature or proposal was approved by maintainers and waiting for implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants