0
sunivycsm created
I need to change my system's UTC to match my region's UTC?
If you're creating a bug/problem report, please include followings:
- ABP Framework version: vX.X.X
6 Answer(s)
-
0
Hi,
Can you explain in detail?
-
0
-
0
Hi,
See: https://docs.abp.io/en/abp/latest/Timing
Configure<AbpClockOptions>(options => { options.Kind = DateTimeKind.Local; });
-
0
Hi,
See: https://docs.abp.io/en/abp/latest/Timing
Configure<AbpClockOptions>(options => { options.Kind = DateTimeKind.Local; });
Hi, liangshiwei i think abp always store UTC +0 on database right? But client side we need to store setting about client UTC. Where do we set this
-
0
Hi,
This is the design of the Aspnet Core Identity, I would like to suggest that don't change it if you don't have to
However, you can change it:
[Dependency(ReplaceServices = true)] [ExposeServices(typeof(IdentityUserManager))] public class MyUserManager : IdentityUserManager { public MyUserManager( IdentityUserStore store, IIdentityRoleRepository roleRepository, IIdentityUserRepository userRepository, IOptions<IdentityOptions> optionsAccessor, IPasswordHasher<IdentityUser> passwordHasher, IEnumerable<IUserValidator<IdentityUser>> userValidators, IEnumerable<IPasswordValidator<IdentityUser>> passwordValidators, ILookupNormalizer keyNormalizer, IdentityErrorDescriber errors, IServiceProvider services, ILogger<IdentityUserManager> logger, ICancellationTokenProvider cancellationTokenProvider, IOrganizationUnitRepository organizationUnitRepository, ISettingProvider settingProvider) : base(store, roleRepository, userRepository, optionsAccessor, passwordHasher, userValidators, passwordValidators, keyNormalizer, errors, services, logger, cancellationTokenProvider, organizationUnitRepository, settingProvider) { } public override async Task<IdentityResult> AccessFailedAsync(IdentityUser user) { ThrowIfDisposed(); var store = GetUserLockoutStore(); if (user == null) { throw new ArgumentNullException(nameof(user)); } // If this puts the user over the threshold for lockout, lock them out and reset the access failed count var count = await store.IncrementAccessFailedCountAsync(user, CancellationToken); if (count < Options.Lockout.MaxFailedAccessAttempts) { return await UpdateUserAsync(user); } Logger.LogWarning(12, "User is locked out."); await store.SetLockoutEndDateAsync(user, DateTime.Now.Add(Options.Lockout.DefaultLockoutTimeSpan), CancellationToken); await store.ResetAccessFailedCountAsync(user, CancellationToken); return await UpdateUserAsync(user); } public override async Task<bool> IsLockedOutAsync(IdentityUser user) { ThrowIfDisposed(); var store = GetUserLockoutStore(); if (user == null) { throw new ArgumentNullException(nameof(user)); } if (!await store.GetLockoutEnabledAsync(user, CancellationToken)) { return false; } var lockoutTime = await store.GetLockoutEndDateAsync(user, CancellationToken); return lockoutTime >= DateTime.Now; } private IUserLockoutStore<IdentityUser> GetUserLockoutStore() { var cast = Store as IUserLockoutStore<IdentityUser>; return cast; } }
-
0
This question has been automatically marked as stale because it has not had recent activity.