Quote:
Originally Posted by ownedbycats
What kind of time formatting uses 101 as an epoch anyways? Google is failing me...
|
Some value must be chosen for undefined. That value must work in sqlite, in python (2 & 3), and in other libraries, which means that NULL, None, and empty don't work.
Many years ago (probably > 15) the choice was made to use 1 Jan 0101 as the undefined date. It is up to the user to check. Somewhere lost in time that check disappeared from save-to-disk template handing, which BTW although it looks a bit like SFM it is *not* using the calibre template language. Again, historical. There are a few cases like this that predate the template language or require processing where the template processor doesn't exist.
I often run across code I wrote before templates existed. And before a consolodated metadata structure existed. And before consistent custom columns existed. And ...