mate-desktop / caja

Caja, the file manager for the MATE desktop
https://mate-desktop.org/
Other
265 stars 143 forks source link

caja-file: fix yesterday/today informal date bug #1710

Closed basicmaster closed 1 year ago

basicmaster commented 1 year ago

If informal date format is used, the yesterday/today ranges of 48/24 hours apply to the end of the current day, not to the current instant.

Fixes a regression introduced by 476f56a25be636970b336d525a7766b6d1eb3fff. Fixes #1621.

basicmaster commented 1 year ago

Files in a folder, all from yesterday, accessed now (2023-04-15 at noon): grafik

Caja without bugfix: grafik

Caja with bugfix: grafik

lukefromdc commented 1 year ago

I really do not know how to test this for function. Using this date format here Date_Format

basicmaster commented 1 year ago

The last date format option in caja's settings is the one that is called "informal date format" in the code: grafik

In general it uses the full form of the day of the week, not the abbreviated one. For files that have been modified today or yesterday, this format replaces day of week and date in the displayed modified date by the words "today" or "yesterday".

In this particular case, the patch makes a difference for a file that was created yesterday but is not older than 24 hours. The same applies to a file that was created two days ago but is not older than 48 hours. So for testing you would need to create such files e.g. using touch -t.

lukefromdc commented 1 year ago

It would be best if another team member could test this first, as I really can't wrap my head around this and never use that format

raveit65 commented 1 year ago

I can reproduce the issue and i will test the fix.