|
@ -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): |
|
|