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

parse_datetime for post within 24 hour #37

Open
Raymondkltse opened this issue Feb 25, 2024 · 3 comments
Open

parse_datetime for post within 24 hour #37

Raymondkltse opened this issue Feb 25, 2024 · 3 comments

Comments

@Raymondkltse
Copy link

the code look for the aabr element inside a post/comment.
somehow for post recently added (within 24 hour)
the aabr shown as example:
1 hour ago
34 minutes ago
20 hrs

there is a missing ago in the last example, and also the parse_datetime would do the 1 hour ago by assuming now at today midnight.

@Raymondkltse
Copy link
Author

my workaround now to replace the following code in utils.py

settings = {
    #'RELATIVE_BASE': datetime.today().replace(minute=0, hour=0, second=0, microsecond=0)
    'RELATIVE_BASE': datetime.now()
}

@moda20
Copy link
Owner

moda20 commented Feb 26, 2024

@Raymondkltse can you create a PR for that ?

@KazimierzLipski
Copy link

Thanks for the fix :)

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

3 participants