mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-28 11:44:35 +01:00
...
This commit is contained in:
parent
ad117486c1
commit
0d90ff04d3
1 changed files with 1 additions and 1 deletions
|
|
@ -72,7 +72,7 @@ def qt_to_dt(qdate_or_qdatetime, as_utc=True):
|
|||
return dt.astimezone(_utc_tz if as_utc else _local_tz)
|
||||
|
||||
def fromtimestamp(ctime, as_utc=True):
|
||||
dt = datetime.utcfromtimestamp().replace(tzinfo=_utc_tz)
|
||||
dt = datetime.utcfromtimestamp(ctime).replace(tzinfo=_utc_tz)
|
||||
if not as_utc:
|
||||
dt = dt.astimezone(_local_tz)
|
||||
return dt
|
||||
|
|
|
|||
Loading…
Reference in a new issue