Conversation
theoniko
force-pushed
the
fix-5367-replace-datetime.utcnow-with-datetime.now-timezone.utc
branch
3 times, most recently
from
September 19, 2026 14:02
084467f to
bf54046
Compare
theoniko
force-pushed
the
fix-5367-replace-datetime.utcnow-with-datetime.now-timezone.utc
branch
from
September 19, 2026 14:50
bf54046 to
65fe24e
Compare
theoniko
marked this pull request as ready for review
September 19, 2026 17:13
suhaibmujahid
requested changes
Sep 22, 2026
suhaibmujahid
left a comment
Member
There was a problem hiding this comment.
Thank you! Looks good to me in general, just simple changes.
Comment on lines
125
to
+129
| pushdate = dateutil.parser.parse(commit_data["pushdate"]) | ||
| if pushdate.tzinfo is None: | ||
| pushdate = pushdate.replace(tzinfo=tz.UTC) | ||
| else: | ||
| pushdate = pushdate.astimezone(tz.UTC) |
Member
There was a problem hiding this comment.
Simplified:
Suggested change
| pushdate = dateutil.parser.parse(commit_data["pushdate"]) | |
| if pushdate.tzinfo is None: | |
| pushdate = pushdate.replace(tzinfo=tz.UTC) | |
| else: | |
| pushdate = pushdate.astimezone(tz.UTC) | |
| pushdate = datetime.fromisoformat(commit_data["pushdate"]) | |
| pushdate = pushdate.replace(tzinfo=pushdate.tzinfo or timezone.UTC) |
Comment on lines
-76
to
+90
| created_at: Mapped[datetime] = mapped_column(server_default=func.now()) | ||
| created_at: Mapped[datetime] = mapped_column( | ||
| DateTime(timezone=True), nullable=False, server_default=func.now() | ||
| ) | ||
| updated_at: Mapped[datetime] = mapped_column( | ||
| server_default=func.now(), server_onupdate=func.now() | ||
| DateTime(timezone=True), | ||
| nullable=False, | ||
| server_default=func.now(), | ||
| server_onupdate=func.now(), |
Member
There was a problem hiding this comment.
This seems out of the scope of this PR.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5367