There are a number of much older issues around this (#65 , #157 , #213) and I was hoping it would be resolved with a fix for #38 et al., and a fix (without a test) was even merged in for it (#232), but it continues to be an issue.
Repro:
es6
const rrule = RRule.fromString('DTSTART=20181101T100000Z;UNTIL=20181106T100000Z;FREQ=DAILY')
expect(rrule.all()).to.deep.equal([
new Date('2018-11-01T10:00:00.000Z'),
new Date('2018-11-02T10:00:00.000Z'),
new Date('2018-11-03T10:00:00.000Z'),
new Date('2018-11-04T10:00:00.000Z'),
new Date('2018-11-05T10:00:00.000Z'),
new Date('2018-11-06T10:00:00.000Z')
])
Result:
AssertionError: expected [ Array(5) ] to deeply equal [ Array(6) ]
+ expected - actual
[
[Date: 2018-11-01T10:00:00.000Z]
[Date: 2018-11-02T10:00:00.000Z]
[Date: 2018-11-03T10:00:00.000Z]
- [Date: 2018-11-04T11:00:00.000Z]
- [Date: 2018-11-05T11:00:00.000Z]
+ [Date: 2018-11-04T10:00:00.000Z]
+ [Date: 2018-11-05T10:00:00.000Z]
+ [Date: 2018-11-06T10:00:00.000Z]
]
The resulting times for a daily repeating routine are off by 1 hour after "fall back". This only reproduces when the machine's time zone is one with DST, so it does not exist under UTC, for example.
该提问来源于开源项目:jakubroztocil/rrule