mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
4508e482a7
commit
3b95ee47ba
@ -289,7 +289,7 @@ def timestampfromdt(dt, assume_utc=True):
|
|||||||
# Format date functions {{{
|
# Format date functions {{{
|
||||||
|
|
||||||
def fd_format_hour(dt, ampm, hr):
|
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:
|
if len(hr) == 1:
|
||||||
return f'{h}'
|
return f'{h}'
|
||||||
return f'{h:02}'
|
return f'{h:02}'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user