Skip to content

Conversation

@antsgar
Copy link
Contributor

@antsgar antsgar commented Jul 7, 2025

Although we have some logic preventing a payload from having a negative created_at or updated_at timestamp, when only the date fields are set and not the timestamp ones, the condition checking for a negative timestamp is not triggered. The timestamp is afterwards calculated from the date attributes, and if those correspond to a date before 1970-01-01, a negative timestamp is stored in the database.

This PR updates the logic so that it also checks for a created_at or updated_at field where the date is before 1970-01-01.

@antsgar antsgar requested review from karolsojko and moughxyz July 7, 2025 22:36
@antsgar antsgar force-pushed the fix/prevent-negative-created-at-timestamps branch from 379a217 to 85fb321 Compare July 7, 2025 22:39
@antsgar antsgar merged commit 2459e06 into main Jul 9, 2025
7 of 8 checks passed
@antsgar antsgar deleted the fix/prevent-negative-created-at-timestamps branch July 9, 2025 14:26
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.

3 participants