Commit e380917
Sandor Oroszi
Handle datetimes with time zone information in crypto.X509Store.set_time()
#907 fixed the issue with set_time() not working on Windows.
It also changed set_time()'s behavior in an incompatible way: instead of
treating vfy_time always being in local time (regardless if it had a time
zone attached or not), it now treats vfy_time as a time in UTC.
This patch improves on that by taking the time zone into account, and also
documents the incompatible change.
Note that it is not always possible to convert a timestamp in an arbitrary
time zone into UTC unambiguously, due to repeated or skipped local times
around DST changes. The best is to use a timezone-aware vfy_time
using the UTC time zone.1 parent 669dcc3 commit e380917
2 files changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1660 | 1660 | | |
1661 | 1661 | | |
1662 | 1662 | | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
1663 | 1668 | | |
1664 | 1669 | | |
1665 | 1670 | | |
1666 | 1671 | | |
1667 | 1672 | | |
1668 | 1673 | | |
1669 | 1674 | | |
1670 | | - | |
| 1675 | + | |
| 1676 | + | |
1671 | 1677 | | |
1672 | 1678 | | |
1673 | 1679 | | |
1674 | 1680 | | |
1675 | 1681 | | |
1676 | 1682 | | |
1677 | | - | |
| 1683 | + | |
1678 | 1684 | | |
1679 | 1685 | | |
1680 | 1686 | | |
| |||
0 commit comments