diff --git a/Content.Client/_Sunrise/Time/TimeSystem.cs b/Content.Client/_Sunrise/Time/TimeSystem.cs index f5e2943b1f3..d22ebc82a47 100644 --- a/Content.Client/_Sunrise/Time/TimeSystem.cs +++ b/Content.Client/_Sunrise/Time/TimeSystem.cs @@ -1,48 +1,22 @@ -using Content.Shared.Examine; -using Content.Shared.GameTicking; -using Robust.Shared.Timing; -using System; - namespace Content.Client._Sunrise.Time; public sealed class TimeSystem : EntitySystem { - [Dependency] private readonly IGameTiming _timing = default!; - - private TimeSpan _roundStart; - - public override void Initialize() + public (TimeSpan Time, int Date) GetStationTime() { - base.Initialize(); - SubscribeNetworkEvent(LobbyStatus); - } + var moscowTime = DateTime.UtcNow + TimeSpan.FromHours(3); + var stationTime = moscowTime.TimeOfDay; - private void LobbyStatus(TickerLobbyStatusEvent ev) - { - _roundStart = ev.RoundStartTimeSpan; - } + var daysPassed = (int)stationTime.TotalHours / 24; + stationTime = stationTime.Subtract(TimeSpan.FromHours(daysPassed * 24)); - public (TimeSpan Time, int Date) GetStationTime() - { - var moscowTime = DateTime.UtcNow + TimeSpan.FromHours(3); - var stationTime = moscowTime.TimeOfDay; + var date = 13 + daysPassed; - var daysPassed = (int)stationTime.TotalHours / 24; - stationTime = stationTime.Subtract(TimeSpan.FromHours(daysPassed * 24)); - - var date = 13 + daysPassed; - - return (stationTime, date); - } - - public TimeSpan GetCurrentServerTime() - { - var moscowTime = DateTime.UtcNow + TimeSpan.FromHours(3); - return moscowTime.TimeOfDay; - } + return (stationTime, date); + } - public string GetDate() - { - return DateTime.Now.AddYears(1000).ToString("dd.MM.yyyy"); - } -} \ No newline at end of file + public string GetDate() + { + return DateTime.UtcNow.AddYears(1000).ToString("dd.MM.yyyy"); + } +}