From cd8746883e558e8527355e1c2342e8053848e91c Mon Sep 17 00:00:00 2001 From: SayaAndy Date: Tue, 12 Aug 2025 13:55:17 +0700 Subject: fix: published time sort format: have a map more square on mobile --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index c85a304..d6b63d5 100644 --- a/main.go +++ b/main.go @@ -287,12 +287,12 @@ func main() { case "actionDateDesc": return strings.Compare(b["ActionDate"], a["ActionDate"]) case "publicationDateAsc": - publishedTimeA, _ := time.Parse(time.RFC3339, a["PublishedTime"]) - publishedTimeB, _ := time.Parse(time.RFC3339, b["PublishedTime"]) + publishedTimeA, _ := time.Parse("2006-01-02 15:04:05 -0700", a["PublishedTime"]) + publishedTimeB, _ := time.Parse("2006-01-02 15:04:05 -0700", b["PublishedTime"]) return publishedTimeA.Compare(publishedTimeB) case "publicationDateDesc": - publishedTimeA, _ := time.Parse(time.RFC3339, a["PublishedTime"]) - publishedTimeB, _ := time.Parse(time.RFC3339, b["PublishedTime"]) + publishedTimeA, _ := time.Parse("2006-01-02 15:04:05 -0700", a["PublishedTime"]) + publishedTimeB, _ := time.Parse("2006-01-02 15:04:05 -0700", b["PublishedTime"]) return publishedTimeB.Compare(publishedTimeA) } return 0 -- cgit v1.3.1+13