Chyba ve znaménku při počítání časů :-D
This commit is contained in:
parent
88af1e6752
commit
8e17ad9f46
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ def kratke_datum(dt):
|
||||||
naive_now = datetime.now()
|
naive_now = datetime.now()
|
||||||
tz = timezone(TIME_ZONE)
|
tz = timezone(TIME_ZONE)
|
||||||
now = tz.localize(naive_now)
|
now = tz.localize(naive_now)
|
||||||
delta = dt - now
|
delta = now - dt
|
||||||
if delta <= timedelta(days=1):
|
if delta <= timedelta(days=1):
|
||||||
return dt.strftime("%k:%M")
|
return dt.strftime("%k:%M")
|
||||||
if delta <= timedelta(years=1):
|
if delta <= timedelta(years=1):
|
||||||
|
|
Loading…
Reference in a new issue