mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-05-30 10:35:20 -04:00
...
This commit is contained in:
@@ -289,7 +289,7 @@ def timestampfromdt(dt, assume_utc=True):
|
||||
# Format date functions {{{
|
||||
|
||||
def fd_format_hour(dt, ampm, hr):
|
||||
h = strftime('%I' if ampm else '%H', t=dt.timetuple())
|
||||
h = int(strftime('%I' if ampm else '%H', t=dt.timetuple()).strip())
|
||||
if len(hr) == 1:
|
||||
return f'{h}'
|
||||
return f'{h:02}'
|
||||
|
||||
Reference in New Issue
Block a user