Opened 2 days ago
Last modified 44 hours ago
#13877 assigned defect
Wrong timeline and days where we have leap hours (summertime / wintertime)
Reported by: | Dirk Stöcker | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | 1.6.1 |
Component: | timeline | Version: | |
Severity: | normal | Keywords: | timezone daylightsaving |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Attached an image of todays timeline which clearly is wrong. The part before the hour change has the correct date, the part afterwards has the date of yesterday.
P.S. Please fix your Anti-Spam setup. It is really strange that I always have to try multiple networks until I find one which is allowed to even access this site at all.
Attachments (1)
Change History (8)
by , 2 days ago
Attachment: | leap_hour.png added |
---|
comment:1 by , 2 days ago
comment:2 by , 2 days ago
Component: | general → timeline |
---|---|
Keywords: | timezone daylightsaving added |
Milestone: | → next-stable-1.6.x |
comment:3 by , 2 days ago
The similar issues have been fixed in [11415] (#10864), however it seems I missed this issue.
-
trac/util/datefmt.py
diff --git a/trac/util/datefmt.py b/trac/util/datefmt.py index a940235e3..c4e7d70d7 100644
a b def to_datetime(t, tzinfo=None): 184 184 185 185 def truncate_datetime(dt): 186 186 """Truncate a datetime object to the start of the day.""" 187 return dt.replace(hour=0, minute=0, second=0, microsecond=0)187 return to_datetime(datetime(dt.year, dt.month, dt.day), dt.tzinfo) 188 188 189 189 190 190 def to_timestamp(dt):
comment:4 by , 45 hours ago
This fixes only half of the issues. Now it displays the correct date, but still splits the entry in two and presents them in reverse order.
comment:7 by , 44 hours ago
Milestone: | next-stable-1.6.x → 1.6.1 |
---|---|
Owner: | set to |
Status: | new → assigned |
Thanks for the feedback. I'll push the changes with unit tests.
The be clear: Everything of the first 2025-03-29 block comes AFTER the entries for 2025-03-30 above!
There is a another 2025-03-29 with the correct data of yesterday below.