Skip to content

Commit 05c8d33

Browse files
jspricketbabej
authored andcommitted
Revert "Avoid offset error in taskwarrior DST calculation"
This reverts commit 74d5376. This seems to work with astimezone().
1 parent 7ccbe68 commit 05c8d33

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tasklib/tests.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,7 +1267,7 @@ def test_complex_eoy_conversion(self):
12671267
else:
12681268
return
12691269

1270-
t = Task(self.tw, description='test task', due='eoy - 2 months')
1270+
t = Task(self.tw, description='test task', due='eoy - 4 months')
12711271
now = datetime.datetime.now().astimezone()
12721272
due_date = datetime.datetime(
12731273
year=now.year,
@@ -1276,7 +1276,7 @@ def test_complex_eoy_conversion(self):
12761276
hour=23,
12771277
minute=59,
12781278
second=59,
1279-
).astimezone() - datetime.timedelta(0, 2 * 30 * 86400)
1279+
).astimezone() - datetime.timedelta(0, 4 * 30 * 86400)
12801280
if self.tw.version >= '2.5.2' and self.tw.version < '2.6.0':
12811281
due_date = datetime.datetime(
12821282
year=now.year+1,
@@ -1285,7 +1285,7 @@ def test_complex_eoy_conversion(self):
12851285
hour=0,
12861286
minute=0,
12871287
second=0,
1288-
).astimezone() - datetime.timedelta(0, 2 * 30 * 86400)
1288+
).astimezone() - datetime.timedelta(0, 4 * 30 * 86400)
12891289
self.assertEqual(due_date, t['due'])
12901290

12911291
def test_filtering_with_string_datetime(self):

0 commit comments

Comments
 (0)