04-14-2011, 06:19 AM | #1 |
Member
Posts: 19
Karma: 258
Join Date: Feb 2011
Device: evo
|
Modified date timestamp incorrect?
A minor bug, but related to my earlier post about the "date" changing from metadata:
As a workaround to my earlier post, I'm sorting by the custom column of "Modified Date". My problem is, what ever Hour:Min timestamp the #last_modified is returning seems to be incorrect. When I edit a book's metadata, I would expect a book to be "snapped" to the top of the stack when sorting by "modified date", descending. Instead, the book ends up somewhere in the middle of the column, well "beneath" other books modified on the same date, but at an earlier hour. This is only important to me because my workflow when adding books wants the recent ones together at the top of the list so I can do bulk edits, metadata download, etc. - and I keep missing some because they get shunted down the list. |
04-14-2011, 06:37 AM | #2 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
If you created the standard, predefined, "Modified date" column then it looks like it is truly the date and not the time.
The template is: {last_modified:'format_date($, "dd MMM yy")'} I'm guessing this could be changed to a specific date and time hh:mm:ss but I don't know how. |
Advert | |
|
04-14-2011, 06:52 AM | #3 |
Member
Posts: 19
Karma: 258
Join Date: Feb 2011
Device: evo
|
Yes, I created it by the standard "Modified date" column. I expected it to read the date, not the time - I'm just wondering if it has an internal hour & Minute as well - I don't necessarily need to display the actual time modified, but was puzzled that it did not "move" books to the top of the descended sort column when I changed them - instead putting them somewhere in the middle of the column.
And I just figured out what it was doing. It was sorting by Date, then by Author. My confusion was because I had clicked on the "modified date" column twice - once to choose the column, then again to change to sort-descending. On other columns, like the "date" column, this stopped any secondary sort of the books, and left them sorted by pure date - but the "date" column would put the latest -added books (unless the date was changed by the opf file) at the top of the column, followed downward by previously added books every time, as though the "date" had an internal "hour & Min" that it could refine the sort by. No matter how many times I click on the "modified date" column, it always retains the secondary sort. I tested with an Author/modified date, and Size/modified date. Perhaps an hour-Minute could be added to the last_modified? It might not matter to enough people to warrant the change, and if not, I can work around it. |
04-14-2011, 07:17 AM | #4 |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
The stored modified date is correct.
Your problem is that the column is sorted by what you see, which does not include the time portion of the modified date. To have the time taken into consideration, you must change the template. Unfortunately, the current version of calibre does not provide a way to display dates with times in custom columns. I interpreted this post as an enhancement request and have added a new format code to do that; the change should be in the next release. After the change is released, either remove the formatting template on your custom column or change the value given to format_date to 'iso', without the quotes. Examples: Code:
{last_modified} Code:
{last_modified:format_date(iso)} |
04-14-2011, 09:12 AM | #5 |
Member
Posts: 19
Karma: 258
Join Date: Feb 2011
Device: evo
|
Perfect! I am so new to Calibre that I'm never sure what I'm seeing is expected behavior or a bug, or should be submitted as an enhancement request. This forum has been so helpful and friendly about "gently" steering me the correct direction. Thanks very much!
|
Advert | |
|
08-18-2014, 06:07 AM | #6 |
r.eads e.njoys b.ooks lol
Posts: 76
Karma: 580748
Join Date: Mar 2010
Location: It's time to get this Book a Rest
Device: Kindle 4 NT
|
Sorry to bump an old post but this happens when you use the search function
I just wanted to comment that the proposed solution for op's problem does not really work. I guess he/she just gave up and hasn't returned feedback. I've tried (for the same purpose - sorting by exact modify time) {last_modified:format_date(iso)} as well as other variations such as {last_modified:'format_date($, "yyyy MM dd, hh mm ss")'} None works. Only the date seems to be stored in the database, and not the hour / minute /second. They all apear as 00 00 00. |
08-18-2014, 06:35 AM | #7 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
08-18-2014, 06:47 AM | #8 |
null operator (he/him)
Posts: 20,583
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@rebl - These tweaks work for me - see attachment
Code:
# Control how dates are displayed gui_pubdate_display_format = 'yyyy MM dd' gui_timestamp_display_format = 'yyyy MM dd hh mm ss' gui_last_modified_display_format = 'yyyy MM dd hh mm ss' Gazumped by chaley BR |
08-18-2014, 09:53 AM | #9 |
Well trained by Cats
Posts: 29,816
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Mine shows perfectly as: dd MMM yyyy hh
did you mess up the required single quotes? |
08-18-2014, 03:07 PM | #10 |
r.eads e.njoys b.ooks lol
Posts: 76
Karma: 580748
Join Date: Mar 2010
Location: It's time to get this Book a Rest
Device: Kindle 4 NT
|
Thank you all for your replies,
@BetterRed, the tweak you recommended, gui_last_modified_display_format = 'yyyy MM dd hh mm ss' did work, but unfortunately any double-click on a cell (entering edit mode), even without modifying anything, actually refreshes the "modified" field, so indeed that's not very useful. I still haven't managed to make the {last_modified:format_date(iso)} work. I had made a custom column with this value (as seen in the attached picture) but after entering edit mode in a cell or entering metadata edit mode for a book (individually) my custom colum is filled with "BAD DATE" value. Maybe the syntax {last_modified:format_date(iso)} is not correct? On the other hand, if {last_modified:format_date(iso)} produces the same output as the "Modified" column then ther's no point using it. I couldn't find in the documentation the difference between timestamp and modified, and what exactly is gui_timestamp_display_format used for. P.S. That's a bummer, after restarting calibre all the values in the "Modified" column have been resetted to exactly the same minute and second, losing my previous differences between records. Maybe what I'm looking for is timestamp and not "modified" but how do I use it? P.P.S. I just made a column (with value "built from other columns") {timestamp} and it shows different values for seconds, but not the metadata modified date. Apparently timestamp show the moment the book was added to the library (?). Please correct me if I'm wrong. So there is no useful function to just see when was the metadata last modified (maybe the only way is using "Everything Search" from "outside"?) Last edited by rebl; 08-18-2014 at 03:16 PM. |
08-18-2014, 07:09 PM | #11 |
null operator (he/him)
Posts: 20,583
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@rebl - IIRC I gave up on 'iso' dates because they seem to introduce timeshifts based on my local time.
I gave up on the modified date for the reasons given by you, chaley and yt. I have a custom column called 'lastaction'. I update it as and when I see fit, usually in the booklist by pressing 'F2' followed by '='. The file system dates in the book folder are also of little use to me. E.g. if I email a 'book' to a colleague (via the windows shell) asking for 'their thoughts', then the file system date wont change. So I update my 'lastaction' column, and record what the action was in my 'notes' custom comments column. Yes 'date' is the 'timestamp' of when the book was added to the database - I don't make any use of it. The only built-in date I make any use of is publication date, but I also have a custom column for original publication date and location. FWIW: in my prior attachment I added the Date and Date Modified columns for the purpose of posting that screenshot - normally I don't display them. BR Last edited by BetterRed; 08-18-2014 at 07:46 PM. |
08-19-2014, 04:22 AM | #12 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
{:'format_date(raw_field('last_modified'), 'iso')'} |
|
08-19-2014, 09:49 AM | #13 |
r.eads e.njoys b.ooks lol
Posts: 76
Karma: 580748
Join Date: Mar 2010
Location: It's time to get this Book a Rest
Device: Kindle 4 NT
|
Thank you all, I'll keep all these in mind. In the end, it seems that the default Modified column seems to work, I am still testing but until now it's all right.
The "modified" value is changed if I double click (or F2) a cell, even if not modifying anything, and that is still a little unsatisfying, but on the other hand if I press E to edit indivually a book's metadata and then I decide to cancel and not save anything, the "modified" remains unchanged. The current "tweaks" I'm using are the ones below, and they work all right gui_timestamp_display_format = 'yyyy-MM-dd, hh:mm:ss' gui_last_modified_display_format = 'yyyy-MM-dd, hh:mm:ss' Very interesting, not any cell produces a change in "modified" time if entering cell with F2 and leaving with no data enter/change. I have Genre cell which is defied as hyerarhical - and this one triggers a change in 'modified' even if I only enter and leave the cell. I have antoher custom, simple text cell, #rg and this one does not trigger a change in "modified" if I don't modify it, just F2 then leave. Last edited by rebl; 08-19-2014 at 09:52 AM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Date Modified column | kakkalla | Calibre | 17 | 02-08-2011 11:23 AM |
Incorrect Date on kindle 3 | yogibare143 | Amazon Kindle | 5 | 12-05-2010 05:43 PM |
Date Added vs. Date Modified | aglaia761 | Calibre | 5 | 11-28-2010 05:34 AM |
Last Modified Date | jjansen | Calibre | 1 | 09-12-2010 10:16 PM |
Incorrect Date on Input | kazbates | Calibre | 2 | 03-19-2009 12:08 AM |