Ensured UTC is used

This commit is contained in:
Khwezi Mngoma
2026-05-15 08:37:58 +02:00
parent 4523ef6151
commit 65687d231e
9 changed files with 24 additions and 24 deletions
@@ -1,6 +1,5 @@
using LiteCharms.Features.Abstractions;
using LiteCharms.Features.Quartz.Abstractions;
using static LiteCharms.Features.Extensions.Timezones;
namespace LiteCharms.Features.Quartz;
@@ -47,12 +46,12 @@ public class JobOrchestrator(ISchedulerFactory schedulerFactory) : IJobOrchestra
.StoreDurably()
.Build();
var now = SouthAfricanTimeZone.UtcNow();
var now = DateTime.UtcNow;
var trigger = global::Quartz.TriggerBuilder.Create()
.WithIdentity(triggerKey)
.WithDescription($"Scheduled via Main Job at {now:g}")
.WithCronSchedule(cronExpression, cron => cron.InTimeZone(SouthAfricanTimeZone)
.WithDescription($"Scheduled via Main Job at {now:g} UTC")
.WithCronSchedule(cronExpression, cron => cron
.WithMisfireHandlingInstructionFireAndProceed())
.StartAt(now)
.Build();