Opened 14 years ago
Closed 12 years ago
#9498 closed defect (fixed)
[Patch] Released versions are visible for the day of release
| Reported by: | Owned by: | Ryan J Ollos | |
|---|---|---|---|
| Priority: | normal | Component: | ExtendedVersionPlugin |
| Severity: | normal | Keywords: | |
| Cc: | Trac Release: | 0.12 |
Description
Hi,
the test whether or not a version has been released actually only checks the date, not the datetime. This way a released version stays visible for the whole day and the label says "due in 33 sec" although it has been released 33sec ago.
Alex
Attachments (1)
Change History (6)
Changed 14 years ago by
| Attachment: | release_versions_fix.patch added |
|---|
comment:1 Changed 14 years ago by
| Summary: | Released versions are visible for the day of release → [Patch] Released versions are visible for the day of release |
|---|
comment:2 Changed 13 years ago by
comment:3 Changed 13 years ago by
| Owner: | changed from Malcolm Studd to Ryan J Ollos |
|---|---|
| Status: | new → assigned |
One other related change I'd recommend is to make more extensive use of the trac.util.datefmt functions, which do a clean job of handling the user's timezone setting.
comment:4 Changed 12 years ago by
| Status: | assigned → new |
|---|
comment:5 Changed 12 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
This issue was fixed in [13310]. The patch in release_versions_fix.patch was mostly correct, except that the timestamp is stored in utc time, so the comparisons need to be done relative to current utc time, not the current user time. Conversion to utc time before storing in database is done here; conversion from utc time to the user's time is done in the template here. format_datetime is a partial function that is passed to the template after populating the req.tz argument (the actual call is through the user_time helper function now, but that detail doesn't matter much).



ACK. This patch looks OK.