Changes between Initial Version and Version 1 of Ticket #29754
- Timestamp:
- Sep 13, 2018, 5:44:19 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #29754
- Property Summary Trunc() doesn't handle NonExistingTimeError/AmbiguousTimeError → Trunc() doesn't handle NonExistentTimeError/AmbiguousTimeError
-
Ticket #29754 – Description
initial v1 1 When `Trunc()` truncates to a nonexisting or ambiguous datetime, the exception raised by pytz remains unhandled. The expected behavior would, IMO, be to use naive datetimes for truncated dates, or adjust to closest existing non-ambiguous datetime.1 When `Trunc()` truncates to a nonexisting or ambiguous datetime, the exception raised by pytz remains unhandled. The expected behavior would, IMO, be to not check the validity of truncated dates. 2 2 3 3 This test for example: … … 13 13 14 14 15 class TestTruncateTo NonExistingTime(TestCase):15 class TestTruncateToInvalidTime(TestCase): 16 16 17 17 def test_truncate_to_dst_ends_stockholm(self): … … 28 28 {{{ 29 29 ====================================================================== 30 ERROR: test_truncate_to_dst_ends_stockholm (trunc.tests.TestTruncate ToNonExistingTime)30 ERROR: test_truncate_to_dst_ends_stockholm (trunc.tests.TestTruncateInvalidTime) 31 31 ---------------------------------------------------------------------- 32 32 Traceback (most recent call last):