mirror of
https://github.com/nkanaev/yarr.git
synced 2025-09-14 02:10:04 +00:00
fix item order
This commit is contained in:
@@ -76,7 +76,7 @@ func (s *Storage) CreateItems(items []Item) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
now := time.Now()
|
||||
now := time.Now().UTC()
|
||||
|
||||
for _, item := range items {
|
||||
_, err = tx.Exec(`
|
||||
@@ -85,7 +85,7 @@ func (s *Storage) CreateItems(items []Item) bool {
|
||||
content, image, podcast_url,
|
||||
date_arrived, status
|
||||
)
|
||||
values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||
values (?, ?, ?, ?, strftime('%Y-%m-%d %H:%M:%f', ?), ?, ?, ?, ?, ?)
|
||||
on conflict (feed_id, guid) do nothing`,
|
||||
item.GUID, item.FeedId, item.Title, item.Link, item.Date,
|
||||
item.Content, item.ImageURL, item.AudioURL,
|
||||
@@ -343,7 +343,7 @@ func (s *Storage) DeleteOldItems() {
|
||||
feedId,
|
||||
STARRED,
|
||||
limit,
|
||||
time.Now().Add(-time.Hour*time.Duration(24*itemsKeepDays)),
|
||||
time.Now().UTC().Add(-time.Hour*time.Duration(24*itemsKeepDays)),
|
||||
)
|
||||
if err != nil {
|
||||
log.Print(err)
|
||||
|
Reference in New Issue
Block a user