Fix #1217623 [Set Undefined 'date'](https://bugs.launchpad.net/calibre/+bug/1217623)