You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/migrations.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -217,6 +217,34 @@ Redis OM includes a built-in migration for datetime field indexing improvements.
217
217
218
218
For detailed information about this migration, see the **[0.x to 1.0 Migration Guide](migration_guide_0x_to_1x.md#datetime-migration-details)**.
219
219
220
+
### Datetime Timezone Normalization in 1.1.0
221
+
222
+
Redis OM Python 1.1.0 tightens timestamp handling for both `datetime.datetime` and `datetime.date` fields:
223
+
224
+
-`datetime.datetime` values are read back as **UTC-aware**`datetime` values.
225
+
-`datetime.date` values are stored as **midnight UTC** instead of local-midnight timestamps.
226
+
227
+
This is usually what you want, but it matters if you already have data written by versions before 1.1.0:
228
+
229
+
- Older `datetime.datetime` records still represent the same instant in time, but code that expected naive `datetime` values may need to handle UTC-aware values.
230
+
- Older `datetime.date` records written in a **non-UTC** environment may load as a different calendar day after upgrading, and equality queries may stop matching those records.
231
+
232
+
If you have existing `datetime.date` data from a release before 1.1.0 and your application was not running in UTC, plan to migrate or re-save that data after upgrading.
233
+
234
+
Example symptom after upgrade:
235
+
236
+
- Stored before 1.1.0 in `Asia/Karachi`: `date(2023, 1, 1)` -> `1672513200` (local midnight)
Redis OM Python 1.1 focuses on compatibility updates and timestamp normalization fixes.
4
+
5
+
## Notable Changes
6
+
7
+
- RedisVL dependency updated to allow newer Python versions
8
+
-`datetime.datetime` values now round-trip as UTC-aware `datetime` values
9
+
-`datetime.date` values now store as midnight UTC instead of local-midnight timestamps
10
+
11
+
## Timestamp Upgrade Note
12
+
13
+
The timestamp normalization change is important if you already have data written by earlier releases:
14
+
15
+
- Existing `datetime.datetime` records still represent the same instant in time, but code that expected naive `datetime` values may need to handle UTC-aware values.
16
+
- Existing `datetime.date` records written in a non-UTC environment may load as a different calendar day after upgrading.
17
+
- Date equality queries may stop matching those older records until the data is re-saved or migrated.
18
+
19
+
For migration guidance, see [Migrations: Datetime Timezone Normalization in 1.1.0](migrations.md#datetime-timezone-normalization-in-110).
0 commit comments