Skip to content

fix get_utc_datetime semantics #10507

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mattf
Copy link

@mattf mattf commented May 2, 2025

Type

🐛 Bug Fix

Changes

previously: python 3.11-, the returned datetime had no timezone; python 3.11+, the returned datetime has a timezone

now: the returned datetime has a timezone

this is important because some common functions error when operating on datetimes without a timezone.
for instance, comparison fails: can't compare offset-naive and offset-aware datetimes.
these functions will fail on py3.11- and succeed on py3.11+.

previously,
  python 3.11-, the returned datetime had no timezone
  python 3.11+, the returned datetime has a timezone

now,
  the returned datetime has a timezone

this is important because some common functions error
when operating on datetimes without a timezone.
for instance, comparison fails:
  can't compare offset-naive and offset-aware datetimes.
these functions will fail on py3.11- and succeed on py3.11+.
Copy link

vercel bot commented May 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 2, 2025 2:01pm

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.

1 participant