Range thing.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Wino.Core.Domain.Models.Calendar;
|
||||
|
||||
public sealed class SystemDateContextProvider : IDateContextProvider
|
||||
{
|
||||
public CultureInfo Culture => CultureInfo.CurrentCulture;
|
||||
|
||||
public TimeZoneInfo TimeZone => TimeZoneInfo.Local;
|
||||
|
||||
public DateOnly GetToday()
|
||||
{
|
||||
var localNow = TimeZoneInfo.ConvertTime(DateTimeOffset.UtcNow, TimeZone);
|
||||
return DateOnly.FromDateTime(localNow.DateTime);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user