mirror of
https://git.vectorsigma.ru/public/photoview.git
synced 2026-08-03 19:29:15 +00:00
Fix timeline order with sqlite3. It should be ordered as MySQL and PGSQL like (year, month, day). (#954)
This commit is contained in:
@@ -24,7 +24,7 @@ func MyTimeline(db *gorm.DB, user *models.User, paginate *models.Pagination, onl
|
||||
Order("media.date_shot DESC")
|
||||
case drivers.SQLITE:
|
||||
query = query.
|
||||
Order("strftime('%j', media.date_shot) DESC"). // convert to day of year 001-366
|
||||
Order("strftime('%Y-%m-%d', media.date_shot) DESC"). // convert to YYYY-MM-DD
|
||||
Order("albums.title ASC").
|
||||
Order("TIME(media.date_shot) DESC")
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user