diff options
| author | 2025-08-12 13:55:17 +0700 | |
|---|---|---|
| committer | 2025-08-12 13:55:17 +0700 | |
| commit | cd8746883e558e8527355e1c2342e8053848e91c (patch) | |
| tree | 3e1b246224fc4373ebd0c79d99b7a0e896cdd982 /main.go | |
| parent | 09cb8a09061d1a8d748ca456780a54a99e1decf3 (diff) | |
| download | web-cd8746883e558e8527355e1c2342e8053848e91c.tar.gz web-cd8746883e558e8527355e1c2342e8053848e91c.zip | |
fix: published time sortv0.5.4
format: have a map more square on mobile
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |