singularityhub / sregistry

server for storage and management of singularity images
https://singularityhub.github.io/sregistry
Mozilla Public License 2.0
103 stars 42 forks source link

Faulty date sorting #412

Open xeniorn opened 1 year ago

xeniorn commented 1 year ago

Describe the bug Sorting by build date within one collection of containers sorts the dates alphabetically rather than chronologically

To Reproduce Open any container collection and try to sort column by build date. Not sure if date format is editable, but it definitely happens when the date is formatted like "Sept. 21, 2022, 9:46 a.m."

Expected behavior Sorted chronologically

If applicable, add versions and screenshots to help explain your problem. image

(does not happen in the all collections view since the date there is in the YYYY-MM-DD format, but possibly the sorting there is also set as text sort rather than date sort)

vsoch commented 1 year ago

Thanks for opening the issue! That particular table is on this page https://github.com/singularityhub/sregistry/blob/cdc23dbf3886fdc7fff6430cb34b31029936fa09/shub/apps/main/templates/collections/view_collection.html#L101 if you’d like to take a shot at fixing the sort.