diff --git a/defs/glover.py.example b/defs/glover.py.example new file mode 100644 index 0000000..a03d657 --- /dev/null +++ b/defs/glover.py.example @@ -0,0 +1,6 @@ +api_id = 1 +api_hash = "a" +rss_hub_host = "https://rsshub.app" +cid = 11 +tid = None +owner = 11 diff --git a/defs/models.py b/defs/models.py index 15329bc..b963f10 100644 --- a/defs/models.py +++ b/defs/models.py @@ -1,4 +1,4 @@ -from datetime import datetime +from datetime import datetime, timedelta from typing import List from pydantic import BaseModel @@ -16,7 +16,8 @@ class Tweet(BaseModel): @property 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):