Closed Bug 194160 Opened 22 years ago Closed 19 years ago

buglist.cgi has wrong time zone in datestamp at the top

Categories

(Bugzilla :: Query/Bug List, defect)

2.17.3
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: justdave, Assigned: Tomas.Kopal)

References

Details

Attachments

(1 file, 2 obsolete files)

According to the editparams page, the timezone of the database server is
supposed to be used anywhere there's a time.  The timestamp at the top of the
buglist.cgi page which tells when the query was run is shown in the local
timezone of the webserver rather than the database server.
in the case where this was noticed, the webserver is in PST and the database
server is in EST. :)
Doh. Is there a way to ask the SQL server what it's time is?  Either that or we
have compute all times in perl so they are based on the web servers time.
-> mine
Assignee: endico → justdave
Attached patch Patch v1 (obsolete) — Splinter Review
Target Milestone: --- → Bugzilla 2.18
Comment on attachment 114980 [details] [diff] [review]
Patch v1

My only concern with this is we need to make sure that if the timezone param is
empty that it still uses the local timezone...
Attachment #114980 - Flags: review?(jake)
Comment on attachment 114980 [details] [diff] [review]
Patch v1

That time is formated really funky... but I guess it always has been. If the
Param() is empty, it instead uses UTC (and displays it as +0000).

There is a special FILTER for time (the code is in Bugzilla::Util.pm), but it
doesn't do any adjusting. Perhaps that should be made to use time2str? Using
that filter would allow the time to be displayed in a more uniform manner.
Attachment #114980 - Flags: review?(jake) → review-
Attached patch Patch v2 (obsolete) — Splinter Review
Yeah, if it's using UTC without a timezone defined then it needs an IF loop for
it...

The ugly display is how it's always been.  I'm just concerned with getting the
correct timezone on the existing output here. :)
Attachment #114980 - Attachment is obsolete: true
Attachment #114982 - Flags: review?(jake)
Dave, why not use Bugzilla::Util->format_time(), which prints out the time
prettier *and* supports the timezone Param?
Status: NEW → ASSIGNED
Summary: buglist.cgi has wrong timezone in datestamp at the top → buglist.cgi has wrong time zone in datestamp at the top
Comment on attachment 114982 [details] [diff] [review]
Patch v2

per kiko's comment 8
Attachment #114982 - Flags: review?(jake) → review-
This should be a quick fix, but I don't have time to do it myself...
Assignee: justdave → nobody
Status: ASSIGNED → NEW
Flags: blocking2.20+
Flags: blocking2.18.1+
*** Bug 285430 has been marked as a duplicate of this bug. ***
Assignee: nobody → Tomas.Kopal
Status: NEW → ASSIGNED
Actually, original text was "Thu Mar 17 16:36:36 +63000 2005", format_time
prints it as "2005-03-17 16:36". I think the original looks better. Which means
Dave's patch is ok :-).
Comments?
Attached patch V3Splinter Review
When the timezone is not defined, we should not print it. I have also moved the
year to be next to date, not time.
Attachment #114982 - Attachment is obsolete: true
Attachment #177712 - Flags: review?
Attachment #177712 - Flags: review? → review+
Flags: approval?
Flags: approval2.18?
Whiteboard: patch awaiting approval
Flags: approval?
Flags: approval2.18?
Flags: approval2.18+
Flags: approval+
Actually, I take that back.  Why aren't we using format_time()?  Does it do
something wrong?  The date display on show_bug has a timezone, how do we do it
there?
Flags: approval2.18+
Flags: approval+
(In reply to comment #14)
> Actually, I take that back.  Why aren't we using format_time()?  Does it do
> something wrong?  The date display on show_bug has a timezone, how do we do it
> there?

Format_time is meant to be used with times from the DB, not perl times. We can't
use it without major hurdle.
Probably better way would be to switch this time to use DB time instead of perl
time(), and to have all the times use the same source (e.g. if DB and web server
are different machines, the time and timezone can be different). Trouble is that
we are using perl time all over the code (e.g. report.cgi - perl time, again
custom formatting, no timezone), so that would be a major rework. We should do
it, but probably not now, in freeze.
OK, let's do this.  I think we have another bug somewhere for consolidating perl
vs DB time in the code.  Should find that bug and add a reminder there to fix
this when we do that.
Flags: approval2.18+
Flags: approval+
Tip:

Checking in template/en/default/list/list.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/list/list.html.tmpl,v 
<--  list.html.tmpl
new revision: 1.36; previous revision: 1.35
done

2.18:

Checking in template/en/default/list/list.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/list/list.html.tmpl,v  <-
-  list.html.tmpl
new revision: 1.25.2.2; previous revision: 1.25.2.1
done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: patch awaiting approval
Do we know the bug number for this time consolodation by chance? Part of the
reason that format_time exists is so all our times can be consistant. This is
also very helpful for (and should be a prereq for) bug 182238.
(In reply to comment #18)
> Do we know the bug number for this time consolodation by chance? Part of the
> reason that format_time exists is so all our times can be consistant. This is
> also very helpful for (and should be a prereq for) bug 182238.

I think bug 283076 is the closest to this, although it has drifted a bit during
the discussion.
Not sure why this is marked as fixed.  Bugzilla 2.18.1 has patch "V3" in it, but
all that does is print the UTC time followed by the configured timezone, which
is even more confusing.
(In reply to comment #20)
> Not sure why this is marked as fixed.  Bugzilla 2.18.1 has patch "V3" in it,
> but all that does is print the UTC time followed by the configured timezone, 
> which is even more confusing.

  That means that your server is set to UTC time. Bugzilla does not do timezone translation. If it's doing timezone translation anywhere, that's a bug, at the moment.
(In reply to comment #21)
>   That means that your server is set to UTC time.

No it isn't:
# date
Mon Jun  4 18:00:47 PDT 2007
# date -u
Tue Jun  5 01:00:49 UTC 2007
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: