Hi
first of all I want to thank you for the great library.
One thing doesn't seem to be working correctly. I am in Europe and DST was applied on 28/3/21 from 2 to 3 am CET which is one hour ahead of UTC. When I ask for the next occurrence 1 minute before DST it returns the right UTC timestamp. Doing the same at DST change it returns the next occurrence 1 week later.
Dim expression As Cronos.CronExpression = Cronos.CronExpression.Parse("0 2 * * 0")
Dim nextOccurrence As DateTimeOffset = expression.GetNextOccurrence(start, timeZone, True)
Return nextOccurrence.DateTime
log time - GetNextOccurrence - start
2021-03-28 01:59:01,812 - 2021-03-28T01:00:00.0000000 - 2021-03-28T00:59:00.0000000Z
2021-03-28 03:00:01,163 - 2021-04-04T00:00:00.0000000 - 2021-03-28T01:00:00.0000000Z
Am I doing something wrong here?
Thanks.
Martin
Hi
first of all I want to thank you for the great library.
One thing doesn't seem to be working correctly. I am in Europe and DST was applied on 28/3/21 from 2 to 3 am CET which is one hour ahead of UTC. When I ask for the next occurrence 1 minute before DST it returns the right UTC timestamp. Doing the same at DST change it returns the next occurrence 1 week later.
Dim expression As Cronos.CronExpression = Cronos.CronExpression.Parse("0 2 * * 0")
Dim nextOccurrence As DateTimeOffset = expression.GetNextOccurrence(start, timeZone, True)
Return nextOccurrence.DateTime
log time - GetNextOccurrence - start
2021-03-28 01:59:01,812 - 2021-03-28T01:00:00.0000000 - 2021-03-28T00:59:00.0000000Z
2021-03-28 03:00:01,163 - 2021-04-04T00:00:00.0000000 - 2021-03-28T01:00:00.0000000Z
Am I doing something wrong here?
Thanks.
Martin