View Single Post
Old 02-09-2011, 02:20 PM   #15
alison87
Member
alison87 began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Feb 2011
Device: Kindle 3G
I added some debugging code today and after some further testing it looks like i was wrong - Calibre doesn't appear to be changing the date when copying via USB. The mobi file is simply dropped into /documents/News, overwriting any previous files. I am guessing that yesterday i had so many versions of the same file floating around on my Kindle i got confused.

What is 100% certain is that the Kindle will always display the date of news items at GMT instead of in your local timezone, which is an Amazon bug. I'm not sure where to file bugs with them, but i'll try going through customer support and see what happens. We can temporarily get around the bug by outputting a bad timestamp in Calibre - override create_opf() in your recipe and replace the calls to nowf() with datetime.now().replace(tzinfo=tzutc()).

Kovid, can you think of any other case where custom recipe builders might want to override the published date and/or timestamp of the OPF file? Perhaps one case might be to use an RSS feed's pubDate tag rather than the actual current date. If this is useful for other people, perhaps you could add a get_opf_pubdate or get_opf_timestamp method that could be overridden by user recipes - that way it would be very easy for users to add the Kindle-specific hack to ignore the real timezone.
alison87 is offline   Reply With Quote