public SillycoreAppBuilder UseLocalTimes() { DataStore.Delete(Constants.DateTimeProvider); DataStore.Set(Constants.DateTimeProvider, new LocalDateTimeProvider()); Services.TryAddSingleton(DataStore.Get <IDateTimeProvider>(Constants.DateTimeProvider)); return(this); }
public SillycoreAppBuilder UseLocalTimes() { SillycoreApp.JsonSerializerSettings.DateTimeZoneHandling = DateTimeZoneHandling.Local; DataStore.Delete(Constants.DateTimeProvider); DataStore.Set(Constants.DateTimeProvider, new LocalDateTimeProvider()); Services.TryAddSingleton(DataStore.Get <IDateTimeProvider>(Constants.DateTimeProvider)); return(this); }