Saving to disk: Fix custom date column being rendered in GMT instead of the local time zone when used in a save to disk template. Fixes #1520895 [Saving books to disk - Wrong year for custom field](https://bugs.launchpad.net/calibre/+bug/1520895)

Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
Kovid Goyal 2015-11-29 17:36:30 +05:30
commit e51736e097

View File

@ -223,7 +223,7 @@ def get_components(template, mi, id, timefmt='%b %Y', length=250,
if key+'_index' in format_args:
format_args[key+'_index'] = fmt_sidx(format_args[key+'_index'])
elif cm['datatype'] == 'datetime':
format_args[key] = strftime(timefmt, format_args[key].timetuple())
format_args[key] = strftime(timefmt, as_local_time(format_args[key]).timetuple())
elif cm['datatype'] == 'bool':
format_args[key] = _('yes') if format_args[key] else _('no')
elif cm['datatype'] == 'rating':