Sorting directories by date
See original GitHub issueDescribe the bug
I am not able to get pigallery2 to sort directories by date. Is there anything I am missing? It seems it’s using some weird sorting. Is it possible it’s some locale/dateformat mixup? Sorting directories by name works as expected.
Screenshots (optional)
This is the top part of the list of directories in the gallery root:
$ ls --full-time --sort=time
total 784
drwxrwsr-x 1 lknop 100 4096 2021-11-23 19:27:32.000000000 +0100 2021_11
drwxrwsr-x 1 lknop 100 4096 2021-11-04 12:50:52.000000000 +0100 2021_10
drwxrwsr-x 1 lknop 100 12288 2021-09-20 23:30:00.000000000 +0200 2021_09
drwxrwsr-x 1 lknop 100 12288 2021-09-01 01:57:08.000000000 +0200 2021_08
drwxrwsr-x 1 lknop 100 4096 2021-09-01 00:04:55.000000000 +0200 canon_2021_08
drwxrwsr-x 1 lknop 100 4096 2021-09-01 00:01:51.000000000 +0200 canon_2021_07
drwxrwsr-x 1 lknop 100 12288 2021-07-20 23:30:00.000000000 +0200 2021_07
drwxrwsr-x 1 lknop 100 326 2021-07-11 23:49:27.000000000 +0200 canon_2020_08
drwxrwsr-x 1 lknop 100 4096 2021-07-11 23:46:43.000000000 +0200 canon_2020_09
drwxrwsr-x 1 lknop 100 326 2021-07-11 23:45:08.000000000 +0200 canon_2020_11
drwxrwsr-x 1 lknop 100 4096 2021-07-11 23:44:17.000000000 +0200 canon_2020_12
drwxrwsr-x 1 lknop 100 326 2021-07-11 23:43:03.000000000 +0200 canon_2021_01
drwxrwsr-x 1 lknop 100 206 2021-07-11 23:41:58.000000000 +0200 canon_2021_02
drwxrwsr-x 1 lknop 100 8192 2021-07-11 23:39:48.000000000 +0200 canon_2021_06
drwxrwsr-x 1 lknop 100 12288 2021-07-04 01:24:35.000000000 +0200 2021_06
drwxrwsr-x 1 lknop 100 8192 2021-05-31 19:25:19.000000000 +0200 2021_05
drwxrwsr-x 1 lknop 100 8192 2021-04-30 22:49:03.000000000 +0200 2021_04
When rendered by pigallery, this is the top of the list when sorted by “descending date”. I have enabled “sort directories by time” checkbox.
Environment: linux amd64 on docker
Used app version:
- docker-nightly
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
How to Sort Output of 'ls' Command By Last Modified Date and ...
In this brief ls command guide, we will look at how to sort the output of ls command by last modification date and...
Read more >How to Sort by Date Modified (Descending) With Folders On ...
To achieve the sort order you prefer, first, sort by the “Date Modified” column in descending order. Then do a secondary sort by...
Read more >How can I sort the output of 'ls' by last modified date?
@jiggunjer ls -Rltr will sort by dir, then by dates, find -type f -mmin -5 -exec ls -ltr {} + will just print...
Read more >How to Sort ls Command by Date | OSXDaily
Open the Terminal if you have not done so already (/Applications/Utilities/ in mac OS) and navigate to the directory you wish to sort...
Read more >Windows 'dir' command: sort files by date when '/s' is specified
The dir command will sort the files in each directory by the date. It will not sort all the files in date order....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
i.e. google photo does something like that. You can sort albums based on date of included photos which makes the youngest album to appear as first in the list. The single albums can be sorted with oldes first (as default) which makes the photos appear in chronological manner.
Or with your
.order_descending_name.pg2conf
trick and your Default photo sorting method set toascending date
you can do this with your PiGallery. But you have to put that file into every folder which includes subfolders. Having that as a setting would be more handsome.Am I alone find sorting like that - youngest albums first and within an album see the start of the photo series before the end - natural?
Sorry, but I find that confusing. If you show me a well known photo browser / gallery that has this feature, I will consider adding it.