Fixed error in SetCurrentDateTime

This commit is contained in:
Chomp
2025-05-04 17:08:57 +01:00
parent 04de5a474a
commit 74781cb1b2
@@ -135,7 +135,9 @@ public class WeatherGenerator(
/// <param name="timestamp"> Optional, timestamp used </param>
protected void SetCurrentDateTime(Weather weather, long? timestamp = null)
{
var inRaidTime = timestamp.HasValue ? _weatherHelper.GetInRaidTime() : _weatherHelper.GetInRaidTime(timestamp.Value);
var inRaidTime = timestamp is null
? _weatherHelper.GetInRaidTime()
: _weatherHelper.GetInRaidTime(timestamp.Value);
var normalTime = GetBsgFormattedTime(inRaidTime);
var formattedDate = _timeUtil.FormatDate(timestamp.HasValue ? _timeUtil.GetDateTimeFromTimeStamp(timestamp.Value) : DateTime.UtcNow);
var datetimeBsgFormat = $"{formattedDate} {normalTime}";