fix: 时区默认采用上海

This commit is contained in:
chenchun
2025-02-08 10:37:33 +08:00
parent 373877cfcf
commit 09d19d876f

View File

@@ -27,8 +27,8 @@ public class YiFrameworkBackgroundWorkersHangfireModule : AbpModule
bool.TryParse(configuration["Redis:IsEnabled"], out var redisEnabled);
foreach (var work in works)
{
//如果为空,默认使用服务器本地utc时间
work.TimeZone ??= TimeZoneInfo.Local;
//如果为空,默认使用服务器本地上海时间
work.TimeZone ??= TimeZoneInfo.FindSystemTimeZoneById("Asia/Shanghai");
if (redisEnabled)
{
await backgroundWorkerManager.AddAsync(work);