mirror of
https://github.com/Xtao-Labs/twitter2telegram.git
synced 2024-11-21 22:58:08 +00:00
fix utc+8 time
This commit is contained in:
parent
cd6c283426
commit
9d58a61430
6
defs/glover.py.example
Normal file
6
defs/glover.py.example
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
api_id = 1
|
||||||
|
api_hash = "a"
|
||||||
|
rss_hub_host = "https://rsshub.app"
|
||||||
|
cid = 11
|
||||||
|
tid = None
|
||||||
|
owner = 11
|
@ -1,4 +1,4 @@
|
|||||||
from datetime import datetime
|
from datetime import datetime, timedelta
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
@ -16,7 +16,8 @@ class Tweet(BaseModel):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def time_str(self) -> str:
|
def time_str(self) -> str:
|
||||||
return self.time.strftime("%Y-%m-%d %H:%M:%S")
|
utc_8_time = self.time + timedelta(hours=8)
|
||||||
|
return utc_8_time.strftime("%Y-%m-%d %H:%M:%S")
|
||||||
|
|
||||||
|
|
||||||
class User(BaseModel):
|
class User(BaseModel):
|
||||||
|
Loading…
Reference in New Issue
Block a user