New config-driven service that replaces JstPeriod. All timestamps are UTC; one config value (GameCalendarConfig.DailyResetUtcHour, default 0 = midnight UTC) drives both ResetReady checks and DayKey/WeekKey/MonthKey bucket keys. Because both derive from the same MostRecentBoundary helper, they can never disagree. Prod parity is a config flip: set DailyResetUtcHour=17 in GameConfigs to get the 02:00 JST boundary. No JST-flavored math anywhere in the code. JstPeriod callsite migration + deletion follow in subsequent commits. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
19 lines
757 B
C#
19 lines
757 B
C#
namespace SVSim.Database.Models.Config;
|
|
|
|
/// <summary>
|
|
/// Reset boundaries for time-windowed game state (daily missions, daily-single packs,
|
|
/// login bonuses). All timestamps in the codebase are UTC; this config only shifts
|
|
/// where the day boundary falls.
|
|
/// </summary>
|
|
[ConfigSection("GameCalendar")]
|
|
public class GameCalendarConfig
|
|
{
|
|
/// <summary>
|
|
/// UTC hour (0-23) at which the daily reset occurs. Default 0 = midnight UTC.
|
|
/// Prod parity: 17 (= 02:00 JST). Changing the value at runtime is safe for the
|
|
/// ResetReady check but retroactively misaligns any DB rows keyed by DayKey /
|
|
/// WeekKey / MonthKey — treat as a startup constant in production.
|
|
/// </summary>
|
|
public int DailyResetUtcHour { get; set; } = 0;
|
|
}
|