fix: 저녁 시작을 17시보다 이르지 않게 — 겨울에 오후 3시가 저녁이던 것
This commit is contained in:
1 parent
639ca83553
commit
96e40d00c8
7 files changed
+53
-20
No files matched your search
@@ -28,7 +28,7 @@ from router.v1.index.protocol import TrendPoint
|
||||
from services.air_service import GRADE_LABEL as AIR_GRADE_LABEL
|
||||
from services.air_service import pm10_grade, pm25_grade
|
||||
from services.bot_comment import fill_bot_comments
|
||||
from services.calc.day_slot import NIGHT_AFTER_SUNSET, slot_of
|
||||
from services.calc.day_slot import NIGHT_AFTER_SUNSET, evening_start, slot_of
|
||||
from services.calc.index_calc import rank_score
|
||||
from services.calc.moon import MoonNight, nearest, night, view_line
|
||||
from services.calc.sky_score import GRADE_LABEL, sky_title
|
||||
@@ -177,7 +177,7 @@ def feed_ttl_sec(now: datetime, sunset_at: datetime) -> int:
|
||||
day = now.date()
|
||||
at = lambda d, h: datetime.combine(d, time(h), tzinfo=KST) # noqa: E731
|
||||
sunset = sunset_at.astimezone(KST)
|
||||
changes = [at(day, _FEED_DAY_START), at(day, 5), at(day, 11), sunset - timedelta(hours=2), sunset, sunset + NIGHT_AFTER_SUNSET,
|
||||
changes = [at(day, _FEED_DAY_START), at(day, 5), at(day, 11), evening_start(sunset), sunset, sunset + NIGHT_AFTER_SUNSET,
|
||||
at(day + timedelta(days=1), _FEED_DAY_START), next_vilage_available(now), latest_ultra_base(now) + timedelta(hours=1) + ULTRA_DELAY,
|
||||
latest_ncst_base(now) + timedelta(hours=1) + NCST_DELAY, now.replace(minute=0, second=0, microsecond=0) + timedelta(hours=1)]
|
||||
air = now.replace(minute=20, second=0, microsecond=0)
|
||||
|
||||
Reference in new issue
Block a user