Skip to content

Resolve datetime utcnow deprecation warnings #1164

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

Merged
merged 1 commit into from
Apr 19, 2025

Conversation

emmanuel-ferdman
Copy link
Contributor

PR Summary

This small PR resolves the deprecation warnings on datetime in Python3.12+. You can find them in the CI logs:

  /__w/khoj/khoj/src/khoj/processor/content/images/image_to_entries.py:61: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    timestamp_now = datetime.utcnow().timestamp()

@debanjum debanjum changed the title Resolve datetime deprecation warnings Resolve datetime utcnow deprecation warnings Apr 19, 2025
@debanjum debanjum merged commit 8f90909 into khoj-ai:master Apr 19, 2025
4 of 6 checks passed
@debanjum
Copy link
Member

Thanks for submitting a fix for the utcnow() deprecation warning!

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

Successfully merging this pull request may close these issues.

2 participants