mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
Add missing 'Z' to datetime string when using UTC
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
parent
f0f49ebef9
commit
b5dc745969
1 changed files with 5 additions and 5 deletions
10
test/start.t
10
test/start.t
|
@ -209,8 +209,8 @@ class TestStart(TestCase):
|
|||
two_hours_before_utc = now_utc - timedelta(hours=2)
|
||||
one_hour_before_utc = now_utc - timedelta(hours=1)
|
||||
|
||||
self.t("track {:%Y-%m-%dT%H:%M:%S} - {:%Y-%m-%dT%H:%M:%S} foo".format(two_hours_before_utc, one_hour_before_utc))
|
||||
code, out, err = self.t("start {:%Y-%m-%dT%H:%M:%S} bar".format(now_utc))
|
||||
self.t("track {:%Y-%m-%dT%H:%M:%S}Z - {:%Y-%m-%dT%H:%M:%S}Z foo".format(two_hours_before_utc, one_hour_before_utc))
|
||||
code, out, err = self.t("start {:%Y-%m-%dT%H:%M:%S}Z bar".format(now_utc))
|
||||
|
||||
self.assertIn("Note: 'bar' is a new tag", out)
|
||||
self.assertIn("Tracking bar", out)
|
||||
|
@ -223,9 +223,9 @@ class TestStart(TestCase):
|
|||
two_hours_before_utc = now_utc - timedelta(hours=2)
|
||||
one_hour_before_utc = now_utc - timedelta(hours=1)
|
||||
|
||||
self.t("track {:%Y-%m-%dT%H:%M:%S} - {:%Y-%m-%dT%H:%M:%S} bar".format(three_hours_before_utc, two_hours_before_utc))
|
||||
self.t("track {:%Y-%m-%dT%H:%M:%S} - {:%Y-%m-%dT%H:%M:%S} foo".format(two_hours_before_utc, one_hour_before_utc))
|
||||
code, out, err = self.t("start {:%Y-%m-%dT%H:%M:%S} bar".format(now_utc))
|
||||
self.t("track {:%Y-%m-%dT%H:%M:%S}Z - {:%Y-%m-%dT%H:%M:%S}Z bar".format(three_hours_before_utc, two_hours_before_utc))
|
||||
self.t("track {:%Y-%m-%dT%H:%M:%S}Z - {:%Y-%m-%dT%H:%M:%S}Z foo".format(two_hours_before_utc, one_hour_before_utc))
|
||||
code, out, err = self.t("start {:%Y-%m-%dT%H:%M:%S}Z bar".format(now_utc))
|
||||
|
||||
self.assertNotIn("Note: 'bar' is a new tag", out)
|
||||
self.assertIn("Tracking bar", out)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue