about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/Trips.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Trips.hs b/src/Trips.hs
index 022631219c62..f90740363c52 100644
--- a/src/Trips.hs
+++ b/src/Trips.hs
@@ -33,10 +33,10 @@ delete dbFile tripKey =
 -- | Return a list of all of the trips in `dbFile`.
 listAll :: FilePath -> IO [T.Trip]
 listAll dbFile = withConnection dbFile $ \conn ->
-  query_ conn "SELECT username,destination,startDate,endDate,comment FROM Trips"
+  query_ conn "SELECT username,destination,startDate,endDate,comment FROM Trips ORDER BY date(startDate) ASC"
 
 -- | Return a list of all of the trips in `dbFile`.
 list :: FilePath -> T.Username -> IO [T.Trip]
 list dbFile username = withConnection dbFile $ \conn ->
-  query conn "SELECT username,destination,startDate,endDate,comment FROM Trips WHERE username = ?"
+  query conn "SELECT username,destination,startDate,endDate,comment FROM Trips WHERE username = ? ORDER BY date(startDate) ASC"
     (Only username)