Bug 813 - The timestamp in Bugzilla comments can be wrong
Summary: The timestamp in Bugzilla comments can be wrong
Status: RESOLVED FIXED
Alias: None
Product: Infrastructure
Classification: Unclassified
Component: Bugzilla (show other bugs)
Version: unspecified
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Sysadmin Team
QA Contact:
URL:
Whiteboard:
Keywords:
: 1004 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-04-14 02:39 CEST by Frédéric "LpSolit" Buclin
Modified: 2014-05-08 18:06 CEST (History)
6 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments
screenshot (70.73 KB, image/png)
2011-07-28 23:08 CEST, Frédéric "LpSolit" Buclin
Details

Description Frédéric "LpSolit" Buclin 2011-04-14 02:39:49 CEST
See e.g. bug 808 comment 5. I submitted it at 02:35 CEST, but the comment timestamp says 04:35 CEST.
Comment 1 Michael Scherer 2011-04-14 16:48:16 CEST
Here, the server show  "02:35:55 UTC", which look correct to me :

~ $ date
jeu. avril 14 16:47:29 CEST 2011
~ $ date -u
jeu. avril 14 14:47:32 UTC 2011

So maybe that's a issue with your setting ( or with mine ).

CC: (none) => misc

Comment 2 Frédéric "LpSolit" Buclin 2011-04-14 16:49:52 CEST
Michael Scherer 2011-04-14 18:48:16 CEST <-- that's in two hours.
Comment 3 Michael Scherer 2011-04-14 16:54:19 CEST
Ok so there is something funky going on.
Does it happen :
- when you are not logged ?
- using a different browser  ?

I still do not see the issue using firefox and not being connected, yet I fail to see how this would changes something ( and yet, it does ).
Comment 4 Frédéric "LpSolit" Buclin 2011-04-14 16:56:11 CEST
If I'm logged out and viewing this bug, your last comment 3 has the timestamp 2011-04-14 16:54:19 UTC. This is unrelated to my browser as Bugzilla sets it server-side.
Comment 5 Frank Griffin 2011-04-14 17:02:25 CEST
I see the same timestamp that Frederic does, and I'm in UTC-5:00 using firefox.  It is indeed coming from the server, as the page source shows:

        <span class="bz_comment_time">
          2011-04-14 16:54:19 UTC
        </span>

CC: (none) => ftg

Comment 6 Frédéric "LpSolit" Buclin 2011-04-14 17:06:20 CEST
Are Bugzilla and the DB server in the same timezone?
Comment 7 Michael Scherer 2011-04-14 17:38:15 CEST
Same server, likely same timezone. I can restart both but I would prefer not.

The httpd server has less env vars thatn postgresql, yet there doesn't seems to have any issue related to timezone.

So that's set server side, but we do not have the same result. 

So just to be clear, the issue is on the web page, or on mail sent on the ml ? ( cause I have been looking at the web page, but maybe I misunderstood )
Comment 8 Frédéric "LpSolit" Buclin 2011-04-14 17:43:30 CEST
The issue is on the web page, yes. The Date: header in bugmails is correct.

What's the output of: SELECT LOCALTIMESTAMP(0) in PostgreSQL?
Comment 9 Michael Scherer 2011-04-14 18:01:19 CEST
postgres=# SELECT LOCALTIMESTAMP(0);
      timestamp      
---------------------
 2011-04-14 18:00:54
(1 row)

using admin account.
Comment 10 Michael Scherer 2011-04-14 18:11:54 CEST
bugs=> SELECT LOCALTIMESTAMP(0);
      timestamp      
---------------------
 2011-04-14 18:11:24
(1 row)

using bugzilla account
Comment 11 Frédéric "LpSolit" Buclin 2011-04-14 18:20:03 CEST
Really weird. I will have to look at the source code to guess what's wrong.
Comment 12 Frédéric "LpSolit" Buclin 2011-04-20 14:38:44 CEST
Per my discussion with misc on IRC, it appears that:

perl -MDateTime::TimeZone -we 'print DateTime::TimeZone->new(name => "local");'

executed from the command line returns DateTime::TimeZone::Europe::Paris, but the timezone user pref set to "Same as server" returns UTC, which doesn't make sense as they both call the same code. The only difference is that the first command is executed from the shell, as root, and the 2nd one is executed by the web server (Apache?). Unless it's possible for the web server to have the wrong timezone set, I have no idea what's wrong. So I give up! :)
Comment 13 Michael Scherer 2011-04-21 02:20:15 CEST
[apache@alamut root]$ perl -MDateTime::TimeZone -we 'print DateTime::TimeZone->new(name => "local") . "\n";' ; id
DateTime::TimeZone::Europe::Paris=HASH(0x13f46b0)
uid=485(apache) gid=480(apache) groups=480(apache)

But maybe the process is running in a different env due to mod_perl ?
Romain d'Alverny 2011-04-26 10:35:07 CEST

CC: (none) => rdalverny

Comment 14 Ahmad Samir 2011-04-27 09:32:28 CEST
*** Bug 1004 has been marked as a duplicate of this bug. ***

CC: (none) => remco

Comment 15 Manuel Hiebel 2011-07-28 22:25:16 CEST
seems resolved, no ?
Comment 16 Manuel Hiebel 2011-07-28 22:27:01 CEST
ah no sorry for the noise :)
Comment 17 Frédéric "LpSolit" Buclin 2011-07-28 23:08:17 CEST
Created attachment 683 [details]
screenshot

The timestamps varie when you reload the page several times. See the screenshot as an example, and note the timestamps on the left and on the right... misc, you installed a random number generator or what? :)
Comment 18 Romain d'Alverny 2011-07-28 23:14:35 CEST
This happens both in anonymous mode (you) and authenticated (mine). And within several reloads, time goes CEST, then CEST+2, then back to CEST.
Comment 19 Romain d'Alverny 2011-07-28 23:23:53 CEST
Is the page cached entirely or partially?

Seeing https://bugzilla.mozilla.org/show_bug.cgi?id=486255 this could be that the timestamp displayed is computed with two distinct (inconsistent) code paths, whether the page is loading from cache or from a fresh copy of the db? (just a guess)
Comment 20 Frédéric "LpSolit" Buclin 2011-07-28 23:28:56 CEST
Unrelated. Bug 486255 is about timestamps in emails sent via SMTP when you live in some "special" timezones.
Comment 21 Marja Van Waes 2011-10-08 22:36:39 CEST
At the moment I don't see a wrong timestamp, but I've seen it so recently that I don't think this got fixed.

Changing the summary to "The timestamp in Bugzilla comments can be wrong", because it is often right.

CC: (none) => marja11
Summary: The timestamp in Bugzilla comments is wrong => The timestamp in Bugzilla comments can be wrong

Comment 22 Marja Van Waes 2012-01-11 21:06:36 CET
Pinging. because nothing happened to this report since more than 3 months ago, and it still has the status NEW or REOPENED.

Please set status to ASSIGNED. If for work flow reasons you can't do that, then please put OK on the whiteboard instead.
Nicolas Vigier 2012-01-11 21:21:13 CET

Status: NEW => ASSIGNED
CC: (none) => boklm

Comment 23 Frédéric "LpSolit" Buclin 2013-02-20 19:00:42 CET
Seems to be ok now. Maybe that's due to the upgrade.

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED

Nicolas Vigier 2014-05-08 18:06:20 CEST

CC: boklm => (none)


Note You need to log in before you can comment on or make changes to this bug.