Closed unterwegi closed 4 years ago
Same with American timezones.
I had similar issue on the last weekend (PST)
@unterwegi @chassing
If you two want to try out the changeset from https://github.com/taichino/croniter/pull/92 I'd appreciate the extra verification.
Is this resolved by the new release (https://pypi.python.org/pypi/croniter/0.3.20)? (https://github.com/taichino/croniter/pull/92)
If I'm using @unterwegi test script than I can still see a strange behavior (I'm using "0,30 " as cron line):
test one - in fall started one day before. we should see 2am twice (see test two):
2017-10-29 01:00:00+02:00
2017-10-29 01:30:00+02:00
2017-10-29 02:00:00+02:00
2017-10-29 02:30:00+02:00
2017-10-29 03:00:00+01:00
2017-10-29 03:30:00+01:00
2017-10-29 04:00:00+01:00
2017-10-29 04:30:00+01:00
test two - in fall started on the same day. this one looks correct but different to test one:
2017-10-29 01:00:00+02:00
2017-10-29 01:30:00+02:00
2017-10-29 02:00:00+02:00
2017-10-29 02:30:00+02:00
2017-10-29 02:00:00+01:00
2017-10-29 02:30:00+01:00
2017-10-29 03:00:00+01:00
2017-10-29 03:30:00+01:00
2017-10-29 04:00:00+01:00
2017-10-29 04:30:00+01:00
test three - in spring but day before. looks strange:
2017-03-26 01:00:00+01:00
2017-03-26 01:30:00+01:00
2017-03-26 02:00:00+02:00
2017-03-26 01:30:00+01:00
2017-03-26 03:00:00+02:00
2017-03-26 03:30:00+02:00
2017-03-26 04:00:00+02:00
2017-03-26 04:30:00+02:00
Hmm, so tests 1 & 2 look correct to me. Am I interpreting that correctly? Test 3 I agree looks strange.
test 1 & 2 should have the same output. 2am must be there twice, once with +02 and once with +01. so the output of test 2 is the correct one
Got the same results as @chassing, also with different time zones.
The output from his second test also looks more correct to me.
dup #90
This example shows the issue:
It just creates some croniter instances with different start_time values that are all around this year's DST changes in Europe and then repeatedly calls get_next on them and prints the returned datetime objects.
Just for background information:
Europe always switches from standard time to DST at 02:00 AM (switching to 03:00 AM) on the last Sunday of March (was the 26th this year). The switch from DST back to standard time then happens at 03:00 AM (back to 02:00 AM) on the last Sunday of October (was the 29th this year).
The first test_croniter call produces output like this:
Here's the second one:
And here the third one:
This is also not limited to the "Europe/Vienna" time zone. The issue also comes up when using "Europe/Kiev", "Europe/Lisbon", "Europe/London", ...
Tested against croniter 0.3.19