v0.1.2 #60
@ -1,6 +1,7 @@
|
||||
import logging
|
||||
from datetime import datetime, timezone
|
||||
from datetime import datetime
|
||||
|
||||
import pytz
|
||||
from convopyro import listen_message
|
||||
from pyrogram import filters
|
||||
from pyrogram.types import ForceReply, Message, ReplyKeyboardRemove
|
||||
@ -65,9 +66,9 @@ async def command_set_offset(app: PyroClient, message: Message):
|
||||
logger.info("User %s has set offset to %s", user.id, offset)
|
||||
|
||||
garbage_time = (
|
||||
datetime.now(timezone.utc)
|
||||
datetime.now(pytz.utc)
|
||||
.replace(hour=user.time_hour, minute=user.time_minute)
|
||||
.astimezone(user.location.timezone or timezone.utc)
|
||||
.astimezone(user.location.timezone or pytz.utc)
|
||||
)
|
||||
|
||||
await answer.reply_text(
|
||||
|
@ -1,5 +1,6 @@
|
||||
from datetime import datetime, timedelta, timezone
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
import pytz
|
||||
from pyrogram import filters
|
||||
from pyrogram.types import Message
|
||||
|
||||
@ -23,11 +24,11 @@ async def command_upcoming(app: PyroClient, message: Message):
|
||||
|
||||
date_min = (
|
||||
datetime.now(user.location.timezone).replace(second=0, microsecond=0)
|
||||
).replace(tzinfo=timezone.utc)
|
||||
).replace(tzinfo=pytz.utc)
|
||||
date_max = (
|
||||
datetime.now(user.location.timezone).replace(second=0, microsecond=0)
|
||||
+ timedelta(days=30)
|
||||
).replace(tzinfo=timezone.utc)
|
||||
).replace(tzinfo=pytz.utc)
|
||||
|
||||
entries = [
|
||||
await GarbageEntry.from_record(entry)
|
||||
|
Reference in New Issue
Block a user