After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 338463 - Chats show UTC timestamps
Chats show UTC timestamps
Status: RESOLVED FIXED
Product: gossip
Classification: Deprecated
Component: General
0.10
Other FreeBSD
: Normal normal
: ---
Assigned To: Gossip Maintainers
Gossip Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-04-14 12:48 UTC by Ralph Meijer
Modified: 2006-08-08 20:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Might help (1.47 KB, patch)
2006-04-25 16:03 UTC, Richard Hult
none Details | Review

Description Ralph Meijer 2006-04-14 12:48:50 UTC
Please describe the problem:
Timestamps in conversations as shown in UTC instead of local time.

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Martyn Russell 2006-04-14 17:29:25 UTC
Right you are Ralph :)

I am not sure why we do this: can anyway tell me before I go changing it? Richard? Micke?

Timestamps are created with:

	time_t     t;
	struct tm *tm;

	t  = time (NULL);
	tm = localtime (&t);

Then tm is used with mktime - in UTC timezone:

	time_set_tz_utc ();
	t = mktime (tm);
        time_reset_tz ();


Comment 2 Richard Hult 2006-04-15 08:07:41 UTC
It's not showing UTC for me, it's showing my local time. The code snippet above is used because we are treating times -as if- they are UTC since it's a lot easier to get working with both localtime and the time stamp that arrives.

Ralph, do you mean that the time stamps in the regular chat windows are shown as UTC for you? If you, has it always done it? And finally, is it in a *BSD system?
Comment 3 Ralph Meijer 2006-04-24 09:17:49 UTC
Yes, I mean the time stamps in the regular chat windows. I don't think it has always done this, but I'm not sure which version started having this problem. I'm using FreeBSD. I think I set that on this issue, but that field seems to have disappeared.
Comment 4 Richard Hult 2006-04-25 16:03:11 UTC
Created attachment 64275 [details] [review]
Might help

Could you please see if this helps?
Comment 5 Martyn Russell 2006-04-28 17:09:07 UTC
Ralph can you see if this is ok for you before this weekend? I plan to do a release, I will include this if it fixes your problem.
Comment 6 Richard Hult 2006-04-29 08:13:42 UTC
Martyn, I don't see the point in closing the bugs like this. NEEDINFO is good for old bugs where there is no feedback and we really need some to go on.

Ralph, do you think this has popped up recently or has it always been like that? I suspect that there is some difference in how the time code works on *BSD and Linux, it works fine for me.
Comment 7 Ralph Meijer 2006-04-29 11:39:35 UTC
I'm sure it has not always been like this, because I would certainly have reported it. I reported on another timestamp issue before.

I tried the patch, but it resulted in not getting any timestamps at all. I talked to Martyn about this, and he was going to try out some things.

What I'm wondering is why the playing with TZ? Can't you just use the system calls for dealing with times in different locales? E.g. gmtime(3) and localtime(3)?
Comment 8 Richard Hult 2006-04-29 14:00:42 UTC
I don't remember the exact reason for the hack, but it had to do with problems with differences between the timezone of incoming messages and the user's own timezone. IIRC it was more speficically due to problems to convert the timestamp from other users to localtime since the timezone handling isn't the same in all unixes. I guess it would be fairly easy to come up with a better way to do it.

This code hasn't changed for a long time though so I don't know why it suddenly doesn't work for you. Switch to a real OS maybe? ;)
Comment 9 Richard Hult 2006-07-21 11:29:17 UTC
I've committed a change that fixes this at least on my Mac which is kind of freebsd-ish. Ralph, could you try as well please?
Comment 10 Martyn Russell 2006-08-08 20:46:14 UTC
Marking this as fixed, Ralph, if you still have this problem, can you reopen please.