You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to find the first DateTime in the timespan that doesn't match the provided cron expression using the CronExpression.IsSatisfiedBy method, the evaluation returns a false negative result when it stumbles upon the hour when the local DST is being changed. In my case, I used the cron expression which should be valid for every second in the month of October, so * * * ? 10 * *. When it gets to October 29th at 1AM UTC, it returns a false result, even though it should be true because it's still October.
Version used
Quartz.NET 3.7.0
To Reproduce
DateTime october1st = new DateTime(2023, 10, 01).ToUniversalTime();
DateTimeOffset? currentDateTime = new DateTimeOffset(october1st);
var dateIncrement = october1st;
while (dateIncrement < october1st.AddMonths(2))
{
var standbyCronExpression = new CronExpression("* * * ? 10 * *");
var matched = standbyCronExpression.IsSatisfiedBy(currentDateTime.Value);
if (matched)
{
dateIncrement = dateIncrement.AddMinutes(1);
currentDateTime = dateIncrement.ToUniversalTime();
}
else
{
Console.WriteLine("Not matched! " + currentDateTime.Value);
Console.ReadKey();
}
}
Expected behavior
The expected behavior in this case would be to get this output " Not matched! 31.10.2023. 23:00:00 +00:00 " which is equivalent to 01.11.2023. 00:00:00 in my local time zone (GMT+1), but instead I get Not matched! 29.10.2023. 01:00:00 +00:00.
The text was updated successfully, but these errors were encountered:
When trying to find the first DateTime in the timespan that doesn't match the provided cron expression using the CronExpression.IsSatisfiedBy method, the evaluation returns a false negative result when it stumbles upon the hour when the local DST is being changed. In my case, I used the cron expression which should be valid for every second in the month of October, so * * * ? 10 * *. When it gets to October 29th at 1AM UTC, it returns a false result, even though it should be true because it's still October.
Version used
Quartz.NET 3.7.0
To Reproduce
Expected behavior
The expected behavior in this case would be to get this output " Not matched! 31.10.2023. 23:00:00 +00:00 " which is equivalent to 01.11.2023. 00:00:00 in my local time zone (GMT+1), but instead I get Not matched! 29.10.2023. 01:00:00 +00:00.
The text was updated successfully, but these errors were encountered: