summaryrefslogtreecommitdiff
path: root/CHANGES
diff options
context:
space:
mode:
authorjoe <32424163+joekohlsdorf@users.noreply.github.com>2022-08-02 06:53:50 -0400
committerGitHub <noreply@github.com>2022-08-02 13:53:50 +0300
commit4ed8aba8441ae841e2c8e698b84ebda1da8208f9 (patch)
tree7a158efd29e52b4cfdc14d3cdc1f935fa568c331 /CHANGES
parentfd9fea6bc07bf0970a5a42c5ec1788272446910c (diff)
downloadredis-py-4ed8aba8441ae841e2c8e698b84ebda1da8208f9.tar.gz
Fix timezone handling for datetime to unixtime conversions (#2213)
* Fix timezone handling for datetime to unixtime conversions datetime objects are supported to set expire, these can have timezones. mktime was used to convert these to unixtime. mktime in Python however is not timezone aware, it expects the input to be UTC and redis-py did not convert the datetime timestamps to UTC before calling mktime. This can lead to: 1) Setting incorrect expire times because the input datetime object has a timezone but is passed to mktime without converting to UTC first. 2) When the datetime timestamp is within DST, mktime fails with "OverflowError: mktime argument out of range" because UTC doesn't have DST. This depends on libc versions. * linters Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
Diffstat (limited to 'CHANGES')
-rw-r--r--CHANGES1
1 files changed, 1 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index d2033ca..1a15a85 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,4 @@
+ * Fix timezone handling for datetime to unixtime conversions
* Fix start_id type for XAUTOCLAIM
* Remove verbose logging from cluster.py
* Add retry mechanism to async version of Connection