Edgewall Software
Modify

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)

leap_hour.png (192.6 KB ) - added by Dirk Stöcker 2 days ago.

Download all attachments as: .zip

Change History (8)

by Dirk Stöcker, 2 days ago

Attachment: leap_hour.png added

comment:1 by Dirk Stöcker, 2 days ago

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.

comment:2 by Jun Omae, 2 days ago

Component: generaltimeline
Keywords: timezone daylightsaving added
Milestone: next-stable-1.6.x

comment:3 by Jun Omae, 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):  
    184184
    185185def truncate_datetime(dt):
    186186    """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)
    188188
    189189
    190190def to_timestamp(dt):
Last edited 2 days ago by Jun Omae (previous) (diff)

comment:4 by Dirk Stöcker, 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:5 by Dirk Stöcker, 45 hours ago

You can see current state at https://josm.openstreetmap.de/timeline

comment:6 by Dirk Stöcker, 45 hours ago

Seems that was a refresh problem. Now it looks good.

comment:7 by Jun Omae, 44 hours ago

Milestone: next-stable-1.6.x1.6.1
Owner: set to Jun Omae
Status: newassigned

Thanks for the feedback. I'll push the changes with unit tests.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as assigned The owner will remain Jun Omae.
The ticket will be disowned. Next status will be 'new'.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.