Opened 17 years ago
Closed 14 years ago
#3086 closed enhancement (fixed)
[patch] Admin "Last Login" users info should use correct time zone
Reported by: | Pedro Algarvio, aka, s0undt3ch | Owned by: | Steffen Hoffmann |
---|---|---|---|
Priority: | normal | Component: | AccountManagerPlugin |
Severity: | trivial | Keywords: | timezone locale |
Cc: | Trac Release: | 0.11 |
Description
On the admin page, the last login info about the users should use req.tz
to use the admin's selected TZ.
Or, as an alternative, start using pretty_timedelta
?
Have the pretty_timedelta
as an extra option?
Attachments (2)
Change History (7)
comment:1 follow-ups: 2 3 Changed 17 years ago by
comment:2 Changed 16 years ago by
Replying to s0undt3ch:
Hmm, apparently
format_datetime
respects the admin's TZ even if notzinfo
is passed.
I'm new to trac. What does this mean? It seems to me as if you are saying that using the format command, you can get the correct timezone to display ( in reports? ).
Can you also use the format command you describe to fix the timezone on the Admin tab?
If so, which file do I need to edit to affect the change?
P.S. I use trac 0.10
comment:3 Changed 16 years ago by
Replying to s0undt3ch:
Hmm, apparently
format_datetime
respects the admin's TZ even if notzinfo
is passed.I tried both:
format_datetime(last_visit, tzinfo=req.tz)and:
format_datetime(last_visit)Same results.
Guess the ticket is now just about the
pretty_timedelta
At least in Trac 0.11.4 this is not true. The results are different (see trac.util.datefmt.format_datetime
which says tz = tzinfo or localtz
). So I've added a patch that fixes this "problem" with req.tz
and format_datetime
.
Btw. I think it's not such a good idea to use a relative timestamp here.
comment:4 Changed 14 years ago by
Keywords: | timezone locale added |
---|---|
Owner: | changed from Matt Good to Steffen Hoffmann |
Status: | new → assigned |
Summary: | Admin Last Login Users Info should use req.tz → [patch] Admin "Last Login" users info should use correct time zone |
I've seen this working with Trac 0.12 without a patch.
I'll add the patch to correct this for older Trac as seems to be required. It'll not hurt anyway.
pretty_timedelta
get's a clear 'wontfix' from me as well. While the value could be disputed in general, IMHO this is certainly not helpful at all in this use case.
comment:5 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [9240]) AccountManagerPlugin: Use Trac's time zone setting to display time stamps correctly, closes #3086.
Hmm, apparently
format_datetime
respects the admin's TZ even if notzinfo
is passed.I tried both:
and:
Same results.
Guess the ticket is now just about the
pretty_timedelta