Pourquoi la récurrence ne fonctionne-t-elle pas correctement sur mon instance Discourse ?

Okay, so, I can insert a time-date thing for tomorrow afternoon:

[date=2021-01-06 time=14:00:00 timezone="America/New_York"]

2021-01-06T19:00:00Z

and that works very nicely, currently showing me:

Then I notice the “recurring” option in the advanced part of the dialog, and this happens to be an event that repeats every two weeks, so I do:

[date=2021-01-06 time=14:00:00 timezone="America/New_York" recurring="2.weeks"]

2021-01-06T19:00:00Z

which, on this server gives me tomorrow as expected (right now, same “Tomorrow 2:00 PM”) but the same line on my hosted discourse instance gives me:

Which is odd! Why doesn’t this work?

And it gets weirder. If I use

[date=2021-01-12 time=14:00:00 timezone="America/New_York" recurring="2.weeks"]

I get “January 26, 2021 2:00 PM” — two weeks later — but if I add a day:

[date=2021-01-13 time=14:00:00 timezone="America/New_York" recurring="2.weeks"]

I get “January 31, 2021 2:00 PM”, and it seems like the error compounds from there. If I give it August 1st, November 25th comes back! If I give 3000-01-01, I get July 14, 3489.

What’s going on here?

3 « J'aime »

Oh, and for bonus weirdness, hourly repeats don’t work either on my site or here. If I do:

[date=2021-01-05 time=14:00:00 timezone="America/New_York" recurring="1.hours"]
[date=2021-01-05 time=14:00:00 timezone="America/New_York" recurring="2.hours"]
[date=2021-01-05 time=14:00:00 timezone="America/New_York" recurring="3.hours"]
[date=2021-01-05 time=14:00:00 timezone="America/New_York" recurring="4.hours"]
[date=2021-01-05 time=14:00:00 timezone="America/New_York" recurring="5.hours"]

Like this:

2021-01-05T19:00:00Z
2021-01-05T19:00:00Z
2021-01-05T19:00:00Z
2021-01-05T19:00:00Z
2021-01-05T19:00:00Z

what I actually get is this (image):

I’m not sure less-than-a-day repeats are actually useful, but since the dialog says they’re an option, I’d expect them to work.

3 « J'aime »

Already reported and fixed in Recurring date is showing wrong next date, which is why it’s working here on meta. If you update to the latest version I’m sure the issue will be fixed on your instance as well. :slight_smile:

4 « J'aime »

Hmm, the hour repetitions are definitely still bugged, though.

4 « J'aime »

Is it normal for updates to land on meta here and then be rolled out to hosted instances later?

Yeah, but I have no idea how long the typical delay is.

1 « J'aime »

Is @j.jaffeux aware of the above?

1 « J'aime »

No I wasnt, thanks, will look first thing tomorrow morning.

3 « J'aime »

Awaiting review but that should fix it:

https://github.com/discourse/discourse/pull/11657

3 « J'aime »

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.