View Single Post
Old 04-26-2015, 08:32 AM   #2
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,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by gsparks2 View Post
How do CC & Calibre determine if metadata needs updating on the device? Does it look at the time stamps of the file or does it do a detailed comparison between Calibre and CC?
The driver in calibre compares the last_mod time from calibre's library to the last_mod time that CC received during the last connect. If they are different (larger or smaller) then the driver sends new metadata to CC.
Quote:
Do CC/Calibre use the same date-time when writing book files to the device?
No. The timestamp of the format on the device is controlled entirely by Android.
Quote:
Reason I am asking: I was examining the files in the device folder and noticed that some of the files had times that were in the future. Not sure how that happened.
Neither am I. As I said above, CC never directly sets the mod time for a file, instead depending on Android to take care of that when a file is created/opened for write. The implication is that during at least one connect the time on the device was not correct.
Quote:
Edit: both the device and pc date/times were set to the same time zone with network updates of time.
While investigating your questions I did discover that CC is sending the file modtime as UTC but the driver in calibre was interpreting it in the local time zone. This means that the auto-format-sync feature might get confused for some time if a format is changed in calibre and immediately synced to CC. I can imagine situations where the file isn't sent for up to 12 hours, and others where the file is sent on every sync for up to 12 hours. I will submit the driver fix to Kovid.
chaley is offline   Reply With Quote