Opened 3 months ago

# Patch to allow WikiCalendarMacro to work with Trac 1.6, plus other stuff

Reported by: Owned by: Dan Ryan J Ollos normal WikiCalendarMacro normal patch

### Description

I'm attaching a patch to allow running with Trac 1.5.4

Beware that some changes are related to #13847, for which I never got back to Ryan. (sorry) Therefore, this patch includes the infamous daystr=('..').join, which didn't work for him.

I also noticed this year that the month when daylight savings time happened, the days were shifted on the calendar. For example, Tuesday items appeared under Wednesday. So I modified it to make some of the calculations use noon instead of midnight, which solved the problem. I'll admit it's not exactly pretty, but it worked.

I also incidentally used this plugin on a test system with Babel installed, which I don't usually use. That also caused a problem with shifting days on the calendar, and I noticed that the Babel weekday list was probably ordered differently than the code assumed. So there is one line in a conditional that seemed to fix that problem as well.

Now that I'm using WSL, I think I understand what you're asking for regarding the locale. I'm using Ubuntu 22.4LTS as my test for Python 3 and Trac 1.5.4.

LANG=C.UTF-8
LANGUAGE=
LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=


I will also attach a Python 3 update to Blog.py that I use in conjunction with this macro.

### Changed 3 months ago by Dan

Patch with various updates, including Python 3.

### Changed 3 months ago by Dan

Blog macro that works in conjunction with the calendar macro.

### comment:1 Changed 3 months ago by Ryan J Ollos

Owner: set to Ryan J Ollos new → accepted

### Modify Ticket

Change Properties