From 7e54d6e46cfa5d0d864a6d519a0222fe9360574f Mon Sep 17 00:00:00 2001 From: Dan Jones Date: Sun, 10 Mar 2024 09:43:56 -0500 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Fix=20parse=5Fdate=5Ftest=20for=20D?= =?UTF-8?q?ST?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/parse_date_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/parse_date_test.go b/tools/parse_date_test.go index cfaadd1..7aa30b2 100644 --- a/tools/parse_date_test.go +++ b/tools/parse_date_test.go @@ -16,8 +16,8 @@ func TestParseDate(t *testing.T) { y, mon, d, h, loc := now.Year(), now.Month(), now.Day(), now.Hour(), now.Location() sec := now.Truncate(time.Second) today := time.Date(y, mon, d, 0, 0, 0, 0, loc) - tomorrow := today.Add(day) - yesterday := today.Add(-day) + tomorrow := time.Date(y, mon, d+1, 0, 0, 0, 0, loc) + yesterday := time.Date(y, mon, d-1, 0, 0, 0, 0, loc) twoMin := now.Add(2 * time.Minute).Truncate(time.Minute) twoHour := time.Date(y, mon, d, h+2, 0, 0, 0, loc) firstMonth := time.Date(y, mon, 1, 0, 0, 0, 0, loc)