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

_updated in metadata use hour instead of minute #64

Open
sdementen opened this issue Aug 29, 2022 · 0 comments
Open

_updated in metadata use hour instead of minute #64

sdementen opened this issue Aug 29, 2022 · 0 comments

Comments

@sdementen
Copy link

sdementen commented Aug 29, 2022

In https://github.com/ranaroussi/pystore/blob/main/pystore/utils.py#L104, the strftime format string is using %I for the minutes instead of %M. It should be

   metadata["_updated"] = now.strftime("%Y-%m-%d %H:%M:%S.%f")

instead of

    metadata["_updated"] = now.strftime("%Y-%m-%d %H:%I:%S.%f")

Moreover, to avoid issues with different timezones, it could be more robust to use now = datetime.utcnow() in https://github.com/ranaroussi/pystore/blob/main/pystore/utils.py#L103

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