mirror of
https://github.com/hyugogirubato/cbz.git
synced 2026-09-26 21:41:03 +00:00
fix deprecated datetime usage
This commit is contained in:
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import zipfile
|
import zipfile
|
||||||
from datetime import datetime
|
from datetime import datetime, timezone
|
||||||
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
@@ -211,7 +211,7 @@ class ComicInfo(ComicModel):
|
|||||||
comic_pages.append(dict(sorted(page_info.items())))
|
comic_pages.append(dict(sorted(page_info.items())))
|
||||||
|
|
||||||
# https://github.com/anansi-project/rfcs/issues/3#issuecomment-671631676
|
# https://github.com/anansi-project/rfcs/issues/3#issuecomment-671631676
|
||||||
utcnow = datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%S.%f')[:-3] + 'Z'
|
utcnow = datetime.now(timezone.utc).strftime('%Y-%m-%dT%H:%M:%S.%f')[:-3] + 'Z'
|
||||||
comic_info.update({
|
comic_info.update({
|
||||||
'@xmlns:xsd': 'http://www.w3.org/2001/XMLSchema',
|
'@xmlns:xsd': 'http://www.w3.org/2001/XMLSchema',
|
||||||
'@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',
|
'@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',
|
||||||
|
|||||||
Reference in New Issue
Block a user