@kiwidude: You want to use parse_only_date() from utils/date.py. Naively creating a utc datetime from a date will cause the month/year to be wrong in some timezones. Note that this function is a relatively recent addition to calibre, so you'd best re-implement it in your plugin for backwards compatibility.
Last edited by kovidgoyal; 05-15-2012 at 06:03 AM.
|