public SillycoreAppBuilder UseLocalTimes()
        {
            DataStore.Delete(Constants.DateTimeProvider);
            DataStore.Set(Constants.DateTimeProvider, new LocalDateTimeProvider());
            Services.TryAddSingleton(DataStore.Get <IDateTimeProvider>(Constants.DateTimeProvider));

            return(this);
        }
Exemple #2
0
        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);
        }