update : 24.06.2025 17:12:03,83
This commit is contained in:
parent
5af63118ae
commit
eaad4e9d7e
@ -29,17 +29,18 @@ def get_date_message(date):
|
||||
#moscow_tz = timezone(timedelta(hours=3), name="MSK")
|
||||
|
||||
#logging.error(str(date))
|
||||
logging.error(str(datetime(2000, 1, 1,0,0,0,tz=timezone.utc)))
|
||||
#logging.error(str(datetime(2000, 1, 1,0,0,0,tzinfo=timezone.utc)))
|
||||
result = "Неопределено"
|
||||
|
||||
if date is None:
|
||||
return "Никогда",100000000000
|
||||
if date<datetime(2000, 1, 1,0,0,0,tz=timezone.utc):
|
||||
return "Никогда",100000000000
|
||||
#if date<datetime(2000, 1, 1,0,0,0,tzinfo=timezone.utc):
|
||||
# return "Никогда",100000000000
|
||||
#today = datetime.today()
|
||||
today = datetime_funcs.get_current_time()
|
||||
interval = today-date
|
||||
interval = interval.total_seconds()
|
||||
logging.error(str(date)+' --- '+str(interval))
|
||||
if interval < 0 :
|
||||
result = date.strftime("%d.%m.%Y %H:%M:%S")
|
||||
elif interval < 60*5 : # 5 мин
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user