Browse Source
Get global or host setting in setting management module.
pull/17159/head
maliming
3 years ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
1 changed files with
6 additions and
2 deletions
-
modules/setting-management/src/Volo.Abp.SettingManagement.Application/Volo/Abp/SettingManagement/TimeZoneSettingsAppService.cs
|
|
|
@ -20,8 +20,12 @@ public class TimeZoneSettingsAppService : SettingManagementAppServiceBase, ITime |
|
|
|
|
|
|
|
public virtual async Task<string> GetAsync() |
|
|
|
{ |
|
|
|
var timezone = await SettingProvider.GetOrNullAsync(TimingSettingNames.TimeZone); |
|
|
|
return timezone ?? "UTC"; |
|
|
|
if (CurrentTenant.GetMultiTenancySide() == MultiTenancySides.Host) |
|
|
|
{ |
|
|
|
return await SettingManager.GetOrNullGlobalAsync(TimingSettingNames.TimeZone); |
|
|
|
} |
|
|
|
|
|
|
|
return await SettingManager.GetOrNullForCurrentTenantAsync(TimingSettingNames.TimeZone); |
|
|
|
} |
|
|
|
|
|
|
|
public virtual Task<List<NameValue>> GetTimezonesAsync() |
|
|
|
|