Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-08-2013, 04:22 PM   #1
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
[Possible Bug] Calibre Publication Date after updating metadata

Hi,

While cleaning up the books in my library, I've found something strange.

When I put a publication date into a book using Sigil, it looks like this:

Code:
<dc:date opf:event="publication">2005-01-01</dc:date>
This is fine: when importing a book into Calibre, it sees the publication date and displays it accordingly. (There is also a "<dc:date opf:event="modification"></dc:date>, which Calibre does not seem to use.)

After updating metadata, either through Modify EPUB, Polish Books, or Save to Disk, the publication date looks like this:

Code:
<dc:date>2004-12-31T23:00:00+00:00</dc:date>
In one way or another, it seems Calibre is able to import this book again, and still display the publication date as being 2005.

If the book is then edited again with Sigil, Sigil doesn't see the publication date anymore. It doesn't show in the tag editor. Often, but not always (strangely enough), Sigil actually deletes the <dc:date> part from the OPF-file.

If the book is then imported into Calibre again, the publication date is gone.

As this problem occurs with Save to Disk, Polish Books and Modify EPUB, I expect this problem to be in the Calibre API. I think I'd be best if Calibre saved the publication date in the same way as Sigil, if at all possible, when updating metadata.

(In case you ask: I'm very particular about my EPUB files being as perfect as possible, with correct tags, dates, a high resolution cover, my preferred layout, and so on. I store a copy of all of my "perfected and finished" books outside Calibre. I use both a "workplace library" and Sigil in conjuction to make the ebooks as I want them.)
Katsunami is offline   Reply With Quote
Old 09-08-2013, 04:44 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,967
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Is your (system) timezone -1?

Maybe Calibre is adjusting based upon that

Add: The original was a raw date (no TZ info)

Last edited by theducks; 09-08-2013 at 04:49 PM. Reason: additional
theducks is offline   Reply With Quote
Advert
Old 09-08-2013, 05:10 PM   #3
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
My timezone is (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna...

(Because of Daylight Saving Time, we're now actually +2 ahead of UTC.)

If I put in that the date of publication is 1-1-2005, I think it's illogical to save it as 31-12-2004, 23:00 in the assumption that calibre is going to Add +1 or more hours based on my time zone If I'd move to the west at some point in my life, it would substract hours, changing the publication date to 2004.

It would be safest to set the publication date at 30-06-2005.

I don't care about month, day, or hour of publication. The "raw" version is what Sigil produces when you add date: publication to the metadata tag-editor.

Sigil can't read Calibre's <dc:date> format (the publication date does not appear in the tag editor), and sometimes, but not always (I have not yet been able to determine when exactly) it'll completely remove Calibre's <dc:date> entries from the OPF file.

Last edited by Katsunami; 09-08-2013 at 05:57 PM.
Katsunami is offline   Reply With Quote
Old 09-08-2013, 06:08 PM   #4
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,380
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Katsunami View Post
Sigil can't read Calibre's <dc:date> format (the publication date does not appear in the tag editor), and sometimes, but not always (I have not yet been able to determine when exactly) it'll completely remove Calibre's <dc:date> entries from the OPF file.
The date 2004-12-31T23:00:00+00:00 is exactly the same date as 2005-01-01T00:00:00+01:00, where the +01:00 is your (and my) home time zone. If no time zone is shown, then your home time zone applies.

All calibre dates are timezone aware. You could argue that some dates should be time zone naive (unknown time zone), but that doesn't change the fact that they are not. It is not calibre's problem that sigil cannot read timezone-aware UTC dates, which is what calibre is producing. It should either keep the timezone or convert the date to local time + naive (no time zone).
chaley is offline   Reply With Quote
Old 09-08-2013, 06:20 PM   #5
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
Maybe then both should be updated to fix this problem.

Sigil should then be updated to correctly handle time-zone aware dates, but I think Calibre may still need to be updated.

First, if I want to put in a publication date, and I put in 1-1-2005, 0:00, I just think it's illogical to save it somewhere in 2004, and then compensate with my time zone when displaying the date. It makes the date change when I change my timezone.

If a book is officially published at 1-1-2005, 0:00 (date/time at the book's publishing location), then it should be possible to just put that date/time into the metadata without regard to timezones. If Calibre can't do that now (if it can, I'm not aware of it), it would be best to make this an option.

Second, I assume Sigil does not include opf:event="publication" in <dc:date> just for fun. At least, FlightCrew validation does not see this as a problem. It's used to recognize the publication date from the creation and modification date of the ebook. I think Calibre should include an option to preserve opf:event="publication" (or creation, or modification) if it's there.

Last edited by Katsunami; 09-08-2013 at 06:28 PM.
Katsunami is offline   Reply With Quote
Advert
Old 09-08-2013, 08:41 PM   #6
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,967
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Katsunami View Post
Maybe then both should be updated to fix this problem.

Sigil should then be updated to correctly handle time-zone aware dates, but I think Calibre may still need to be updated.

First, if I want to put in a publication date, and I put in 1-1-2005, 0:00, I just think it's illogical to save it somewhere in 2004, and then compensate with my time zone when displaying the date. It makes the date change when I change my timezone.

If a book is officially published at 1-1-2005, 0:00 (date/time at the book's publishing location), then it should be possible to just put that date/time into the metadata without regard to timezones. If Calibre can't do that now (if it can, I'm not aware of it), it would be best to make this an option.

Second, I assume Sigil does not include opf:event="publication" in <dc:date> just for fun. At least, FlightCrew validation does not see this as a problem. It's used to recognize the publication date from the creation and modification date of the ebook. I think Calibre should include an option to preserve opf:event="publication" (or creation, or modification) if it's there.
Here is a timestamp from a book I just edited in Sigil

Code:
<dc:date>1980-01-01T13:30:00+00:00</dc:date>
But you are correct that Sigil created ones to not include a TZ
Code:
<dc:date opf:event="modification">2013-09-08</dc:date>
You might raise a bug report at Sigil
theducks is offline   Reply With Quote
Old 09-08-2013, 08:55 PM   #7
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
Is that first timestamp created by Sigil's metadata editor, or is it a preserved Calibre-created timestamp?

Now... Should opf:event="publication" be included by Sigil and Calibre, or not?

Last edited by Katsunami; 09-08-2013 at 08:59 PM.
Katsunami is offline   Reply With Quote
Old 09-08-2013, 10:32 PM   #8
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,967
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Katsunami View Post
Is that first timestamp created by Sigil's metadata editor, or is it a preserved Calibre-created timestamp?

Now... Should opf:event="publication" be included by Sigil and Calibre, or not?
Preserved. All calibre's timestamps are preserved (the older ones had an Flightcrew error. Just taping F8 and saving, fixed those)
theducks is offline   Reply With Quote
Old 09-08-2013, 11:07 PM   #9
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,681
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Katsunami View Post
First, if I want to put in a publication date, and I put in 1-1-2005, 0:00, I just think it's illogical to save it somewhere in 2004, and then compensate with my time zone when displaying the date.
- see attachment - Sigil or similar not used - EPUB converted from DOCX

EDIT : the pubdate of 1853 09 was entered directly into Published cell for the book

The 2nd attachment shows a pamphlet that might have been published in London on 2nd of September 1752, the metadata in the ePUB shows 1st September 1752. But in London there was no 1st of September in 1752, it was one of the 11 days lost when the British Empire changed from the Julian to the Gregorian calender. Pelham was incumbent British PM, my imagination is that the pamphlet would have been a satire involving the PM taking time-out at Bedlam
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	420
Size:	181.2 KB
ID:	110623   Click image for larger version

Name:	Capture2.jpg
Views:	420
Size:	107.0 KB
ID:	110625  

Last edited by BetterRed; 09-09-2013 at 12:15 AM.
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ePub Date of publication -> calibre Published? seanos Calibre 6 08-31-2012 11:45 AM
Publication Date or Copyright Date or ??? hd_cal_dave Library Management 8 05-25-2012 01:50 PM
How to update metadata information from excel (Publication Date,Tags) mahaveer Calibre 3 09-26-2011 12:55 PM
Calibre slow in updating metadata meandher57 Kobo Reader 7 07-14-2011 05:13 PM
Date of Publication Metadata crutledge Sigil 5 01-10-2011 01:27 PM


All times are GMT -4. The time now is 02:39 AM.


MobileRead.com is a privately owned, operated and funded community.