mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
commit
e51736e097
@ -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':
|
||||
|
Loading…
x
Reference in New Issue
Block a user