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 661515 - Wrong date is shown in chat window
Wrong date is shown in chat window
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Archives
3.2.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
empathy-maint
: 668150 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-10-12 03:09 UTC by Jeremy Newton
Modified: 2012-03-06 13:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screen shot of a wrong date; the date is highlighted (43.02 KB, image/png)
2011-10-12 03:09 UTC, Jeremy Newton
  Details
Proposed fix (1017 bytes, patch)
2012-03-06 12:07 UTC, Debarshi Ray
accepted-commit_now Details | Review

Description Jeremy Newton 2011-10-12 03:09:45 UTC
Created attachment 198833 [details]
Screen shot of a wrong date; the date is highlighted

When I access a chat window, the date of the last message(s) seems to be wrong. It says Wednesday the 12th but it's clearly Tuesday the 11th in the previous conversation window. The time is right, just the date is wrong. See the attachment for a visual representation.
Comment 1 Fabio Durán Verdugo 2011-10-12 03:49:18 UTC
for me work fine y all protocols (gtalk, msn, gabber, xmpp) empathy 3.2 ubuntu 11.10
Comment 2 Guillaume Desmottes 2011-10-13 20:11:40 UTC
This date is created in empathy-log-window:get_parent_iter_for_message using:


      date = g_date_time_new_from_unix_local (
          tpl_event_get_timestamp (event));

      pretty_date = g_date_time_format (date,
          C_("A date with the time", "%A, %e %B %Y %X"));


Could you please look at the date stored in the XML files in  ~/.local/share/TpLogger/logs ?
Comment 3 Jeremy Newton 2011-10-20 20:16:13 UTC
For that particular message it says <message time='20111012T02:59:13'

I would assume it's UTC and I since live in UTC-5, thus it's completely correct.

If I would take a guess, it seems very plausible it's taking the UTC date but the UTC-5 timestamp.
Comment 4 Danielle Madeley 2012-03-05 23:57:27 UTC
Is the date wrong in the treeview top-right? Or next to the messages themselves?
Comment 5 Debarshi Ray 2012-03-06 10:27:16 UTC
(In reply to comment #2)
> This date is created in empathy-log-window:get_parent_iter_for_message using:
> 
> 
>       date = g_date_time_new_from_unix_local (
>           tpl_event_get_timestamp (event));
> 
>       pretty_date = g_date_time_format (date,
>           C_("A date with the time", "%A, %e %B %Y %X"));
> 
> 
> Could you please look at the date stored in the XML files in 
> ~/.local/share/TpLogger/logs ?

Guillaume, that piece of code is probably not the cause of this problem because it is used by the Empathy log window, which has the correct date.

Danielle, the date is wrong in the actual message window.
Comment 6 Debarshi Ray 2012-03-06 12:07:29 UTC
Created attachment 209077 [details] [review]
Proposed fix
Comment 7 Danielle Madeley 2012-03-06 12:38:33 UTC
Review of attachment 209077 [details] [review]:

Looks like the same fix I did in the log window one time. Also being in the legacy themes explains why some people don't notice it.

++
Comment 8 Debarshi Ray 2012-03-06 12:52:05 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 9 Debarshi Ray 2012-03-06 13:58:02 UTC
*** Bug 668150 has been marked as a duplicate of this bug. ***