Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

The list view of Nautilus 3.6 shows the dates files were modified in a variety of ways: the hour and minute if modified on the current day, and the month and day if modified during the current year, and the year tacked on if modified during a previous year. I would like to see the entire date and time consistently on all the files (e.g.: Sat 20 Apr 2012 01:28:34 PM EDT).

I had this set up before, but I can't figure out how to do so with version 3.6. I did find this question, but the answers no longer apply to Nautilus 3.6: How to change the date format in Nautilus list columns?

How can I do so in Nautilus 3.6+?

share|improve this question
    
Looking at the settings on precise and raring they are identical so I am assuming it is a feature removed from nautilus there maybe a plugin or script that can re-add it though. –  Davmor2 Apr 26 '13 at 11:58
3  
the date-format key in gsettings was removed by this commit: git.gnome.org/browse/nautilus/commit/libnautilus-private/… which belongs to this bug report: bugzilla.gnome.org/show_bug.cgi?id=676898 –  djfun Apr 26 '13 at 12:39
2  
A link to a "bug" asking that the functionality be restored: bugzilla.gnome.org/show_bug.cgi?id=699055 –  Aibara Iduas Apr 27 '13 at 18:22

2 Answers 2

up vote 15 down vote accepted

You can get back the full date by recompiling nautilus:

sudo apt-get build-dep nautilus
sudo apt-get install quilt
export QUILT_PATCHES=debian/patches
apt-get source nautilus
cd nautilus*
quilt new 999_full_dates.patch
quilt edit libnautilus-private/nautilus-column-utilities.c

Change line 77 from

"attribute", "date_modified",

to

"attribute", "date_modified_full",

Rebuild and install modified package:

quilt refresh
fakeroot dpkg-buildpackage
cd ..
killall nautilus
sudo dpkg -i nautilus_*.deb
nautilus &

As always, you have to perform these steps every time there is an update for nautilus in Ubuntu.

Now, a full analysis of the problem:

The actual patch which caused this change is this one: https://git.gnome.org/browse/nautilus/commit/?id=3fd9cba41e56f44ed955b28755ad03135026d021

The function nautilus_file_get_date_as_string gains an extra gboolean parameter "compact" - when true the abbreviated date is returned.

This function is never called directly - it is accessed through the wrapper function nautilus_file_get_string_attribute_q. This function takes attribute parameters like "date_modified". To accommodate the new signature of nautilus_file_get_date_as_string a new attribute is added "date_modified_full". After this change, any code in nautilus which uses the file date string will get the abbreviated date.

Finally, the file properties dialog is updated to use "date_modified_full" attribute.

So in order to have nautilus display the full date in list view, it is only necessary to change on line of code: in libnautilus-private/nautilus-column-utilities.c, line 77 from "date_modified" to "date_modified_full".

A slightly more useful patch could add a new column type which would show the full date, making this an optional feature, and only add 10 lines of code.

share|improve this answer
7  
This is why I love open source - when the developers go crazy, I can fix it myself. –  Alistair Buxton Apr 26 '13 at 18:58
    
This is why I love open source - people like you can fix things when developers go crazy. Thank you! –  Aibara Iduas Apr 27 '13 at 0:36
    
One minor downside: now if you type home into the dash the home folder it doesn't show up. Typing the username still works though. Not sure why this is, but it's a pretty minor issue. –  Aibara Iduas Apr 27 '13 at 18:21
    
It doesn't show up for me either. I have an unpatched nautilus installed. I don't see how this change could cause a difference in the dash. Can you test with unpatched nautilus please? –  Alistair Buxton Apr 28 '13 at 2:04
1  
Is this currently still the only way to handle this issue? –  Philippe Jul 9 '13 at 17:13

For those using trusty & not wishing to compile I've set up a test ppa for a patched nautilus. (using Alistair Buxton's patch

The build currently also includes 2 bug fix patches, 1 from trusty-proposed, 1 from utopic.

Additionally there are 3 minor patches that have been tested by me over quite some time & pose no issues.

  1. open with on folders

  2. real file owner name displayed instead of "Me"

  3. File Manager as name of launcher

The 'date-time' patch I've tested a bit, seen no issues. For those inclined to try - if any issue found contact me thru launchpad email.

The "Modified (full)" column can be added thru nautilus in listview > View > Visible Columns.. or thru nautilus > Edit > Preferences > List Columns

https://launchpad.net/~mc3man/+archive/nauty-mods

Read ppa page for info & how to easily revert if need be.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.