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

[Py4web 1.20210906.1] Change in timestamp format in restAPI #656

Open
mamisoa opened this issue Nov 8, 2021 · 5 comments
Open

[Py4web 1.20210906.1] Change in timestamp format in restAPI #656

mamisoa opened this issue Nov 8, 2021 · 5 comments
Labels

Comments

@mamisoa
Copy link

mamisoa commented Nov 8, 2021

Hi,

As I mentioned in the google group, I noticed a change in the timestamp format OUTPUT of the restAPI.

It changed from:
(1) yyyy-mm-ddThh:mm:ss
to
(2) yyyy-mm-dd hh:mm:ss

The tricky thing is that it accepts format (1) for POST, but you receive (2) when GET. It makes doing some different and extra work on maintaining the code.

Capture d’écran de 2021-11-01 14-55-38
Capture d’écran de 2021-11-01 14-56-09

I screened last commits in PyDal and Py4web but I couldn't find the change.

https://groups.google.com/g/py4web/c/hyEFF0G92UU

Mamisoa

@nicozanf nicozanf added the bug label Nov 25, 2021
@mdipierro
Copy link
Contributor

Would it be acceptable to make it accept both 1 and 2 for post but always return 2?

@mdipierro
Copy link
Contributor

Can you provide a minimalist example to reproduce? This should accept both formats.

@mamisoa
Copy link
Author

mamisoa commented Feb 13, 2022

I'm sorry for the late reply, I didn't see you replied.
It does accept both formats for a POST request.

But the GET request return only format (2) while I believe it should be more (1) as it is more standard.

@mdipierro
Copy link
Contributor

The reason it uses "2" is that we use the datetime to poulate and the latter does not like the "T".

@mamisoa
Copy link
Author

mamisoa commented Mar 15, 2022

Shouldn't it stay with the format yyyy-mm-ddThh:mm:ss so that it:

  • stays coherent
  • sticks to w3 compliance
  • leaves the translation to other format to a post-processing time outside py4web?

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

No branches or pull requests

3 participants