![]() |
#1 |
Member
![]() Posts: 12
Karma: 10
Join Date: Dec 2020
Location: Germany
Device: Boox Nova 3, Galaxy Tab S6, Samsung M21
|
How to prevent pubdate reformating when sending to device?
I have an issue with pubdates getting changed in unwanted ways on sending to device. (I am aware that the formating itself can be changed by the setting "Format dates as:" in the "Sending books to devices" category, but there seems no way to set it to actually not reformat dates at all.)
Say I have an epub titled "BookTitle" with pubdate "1981-01-01". "Format dates as" is set to "%Y-%m-%d". The book then will end up on the device as "(1980-12-31) BookTitle.epub" Notice that the date has shifted, probably because of some timezone reasons. The weird part is, when I sent to device yesterday evening it used the date 1981-01-01, while when resending today it used 1980-12-31 which led to unwanted duplicates on the device. I haven't figured out yet, at what time in the day sending to device creates the 1981 filename vs. the 1980 one. I tried circumventing Calibre reformating the date by using a custom column {#customname} which is defined as "({pubdate}) {title}". The custom column in Calibre correctly shows "(1980-12-31) BookTitle". My hope was that Calibre would treat this as a blackbox string it would not mess with while sending to device, since it couldn't even know that the contained date wasn't part of the book's title or something. No luck though, the filename on export was still changed to "(1980-12-31) BookTitle.epub" So my question is: Is there any way of stopping Calibre messing with the pubdate in filenames on export? |
![]() |
![]() |
![]() |
#2 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24
Karma: 90156
Join Date: Jul 2017
Device: Nook Glowlight, Sony DPT-CP1
|
Huh. This is specfic to New Years' dates (Dec 31-Jan 1), correct?
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,970
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Based on my own prior issues with datetime columns, I'd try formatting the raw_field instead of using pubdate directly. Something like {format_date(raw_field('pubdate'), 'yyyy-MM-dd'} I think.
Last edited by ownedbycats; 04-24-2021 at 01:41 AM. |
![]() |
![]() |
![]() |
#4 | |
Member
![]() Posts: 12
Karma: 10
Join Date: Dec 2020
Location: Germany
Device: Boox Nova 3, Galaxy Tab S6, Samsung M21
|
Quote:
I got it working with this {:'format_date(raw_field('pubdate'),'yyyy')'} and the year entries looks promising so far. Thank you very much! |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is it possible to prevent calibre from automatically sending news to my device? | jedediah | Calibre | 4 | 04-12-2022 07:50 PM |
How to prevent sending news to one of my devices? | yurkennis | Library Management | 1 | 01-20-2018 09:54 PM |
How to prevent cover being replaced when sending book to device? | GeoffR | Library Management | 5 | 04-11-2015 05:07 AM |
How do i prevent Calibre from converting when sending books to a device? | DMcCunney | Library Management | 7 | 06-06-2014 04:56 PM |
Prevent Calibre from sending pub date? | PapaJohn | Devices | 4 | 04-06-2011 03:14 AM |