Skip to content

Commit

Permalink
Revert "Avoid offset error in taskwarrior DST calculation"
Browse files Browse the repository at this point in the history
This reverts commit 74d5376.

This seems to work with astimezone().
  • Loading branch information
jspricke authored and tbabej committed Nov 15, 2022
1 parent 7ccbe68 commit 05c8d33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tasklib/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,7 @@ def test_complex_eoy_conversion(self):
else:
return

t = Task(self.tw, description='test task', due='eoy - 2 months')
t = Task(self.tw, description='test task', due='eoy - 4 months')
now = datetime.datetime.now().astimezone()
due_date = datetime.datetime(
year=now.year,
Expand All @@ -1276,7 +1276,7 @@ def test_complex_eoy_conversion(self):
hour=23,
minute=59,
second=59,
).astimezone() - datetime.timedelta(0, 2 * 30 * 86400)
).astimezone() - datetime.timedelta(0, 4 * 30 * 86400)
if self.tw.version >= '2.5.2' and self.tw.version < '2.6.0':
due_date = datetime.datetime(
year=now.year+1,
Expand All @@ -1285,7 +1285,7 @@ def test_complex_eoy_conversion(self):
hour=0,
minute=0,
second=0,
).astimezone() - datetime.timedelta(0, 2 * 30 * 86400)
).astimezone() - datetime.timedelta(0, 4 * 30 * 86400)
self.assertEqual(due_date, t['due'])

def test_filtering_with_string_datetime(self):
Expand Down

0 comments on commit 05c8d33

Please sign in to comment.