Commit 39c3452
committed
fix: if PastOrToday validator receives a naive datetime, compare to current time without timezone info
This commit updates the `past_or_today_validator` function to handle naive datetimes (those without timezone information) by comparing them to the current time without timezone info. This allows the validator to work correctly with both aware and naive datetimes, ensuring that it can validate past or present datetimes regardless of their timezone awareness.1 parent 8567db7 commit 39c3452
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
| |||
0 commit comments