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 714376 - Date: header in composed emails has bogus time zone designation
Date: header in composed emails has bogus time zone designation
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: engine
unspecified
Other All
: Normal normal
: 0.6.3
Assigned To: Geary Maintainers
Geary Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-08-10 09:30 UTC by Jim Nelson
Modified: 2014-09-03 00:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Charles Lindsay 2013-11-21 20:26:02 UTC


---- Reported by jim@yorba.org 2012-08-10 14:30:00 -0700 ----

Original Redmine bug id: 5650
Original URL: http://redmine.yorba.org/issues/5650
Searchable id: yorba-bug-5650
Original author: Jim Nelson
Original description:

When I send a message to myself from Geary, the resulting email has this for a
Date: header:

Fri, 10 Aug 2012 21:13:58 **-0007**

However, the Date should be (looking at the Received: header)

Fri, 10 Aug 2012 14:21:00 **-0700**

Note the bogus time zone designation. Also note that the minutes are offset by
the bogus value (7 minutes).

What's strange is that the time is displayed properly in the conversation
viewer. However, the Date: field problem does seem to cause ordering problems
when the conversation includes messages from a non-Geary emailer.

Related issues:
related to geary - 5887: [norepro] Message delivery seems delayed for 24
hours (Invalid)
duplicated by geary - 5449: correct handling of timezones (Duplicate)



---- Additional Comments From geary-maint@gnome.bugs 2013-01-15 16:34:00 -0800 ----

### History

####

#1

Updated by Adam Dingle about 1 year ago

  * **Target version** deleted (<strike>_0.2_</strike>)

####

#2

Updated by Jim Nelson 10 months ago

  * **Category** set to _engine_
  * **Priority** changed from _High_ to _Normal_



--- Bug imported by chaz@yorba.org 2013-11-21 20:26 UTC  ---

This bug was previously known as _bug_ 5650 at http://redmine.yorba.org/show_bug.cgi?id=5650

Unknown version " in product geary. 
   Setting version to "!unspecified".
Unknown milestone "unknown in product geary. 
   Setting to default milestone for this product, "---".
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.
Resolution set on an open status.
   Dropping resolution 

Comment 1 Henrik 2014-04-08 11:44:54 UTC
I suspect that this bug delays / discards emails sent through Apple iCloud SMTP service too.
Comment 2 Henrik 2014-04-09 08:56:31 UTC
In file "rfc822-message.vala", on the row that says:
---------------------------------------------------------
message.set_date((time_t) email.date.to_unix(), (int) (email.date.get_utc_offset() / TimeSpan.HOUR));
---------------------------------------------------------

If it is changed to:
---------------------------------------------------------
message.set_date((time_t) email.date.to_unix(), 0);
---------------------------------------------------------

Then everything works. The MIME message is correct, although it sets the date header to the utc-date with zero offset. That is, it is not the current local time plus the offset, but it is still the correct time.

Example:
Was in my timezone (Sweden):
Date: Wed, 09 Apr 2014 08:35:54 +0002

Should have been:
Date: Wed, 09 Apr 2014 08:33:54 +0200

With the fix:
Date: Wed, 09 Apr 2014 06:33:54 +0000
Comment 3 Jim Nelson 2014-05-12 21:48:56 UTC
Good catch.  I tracked this down to a problem with the time zone we were handing to GMime for converting the date, so time zone information is preserved.

Pushed to master, commit f38c8c
Comment 4 Thomas Moschny 2014-08-22 16:28:23 UTC
Could you please apply this patch to the 0.6 branch also?
Comment 5 Jim Nelson 2014-08-22 18:28:44 UTC
I wasn't planning on generating another dot release for 0.6.  Is there a reason in particular you want this patch applied?
Comment 6 Thomas Moschny 2014-08-23 08:30:17 UTC
(In reply to comment #5)
> I wasn't planning on generating another dot release for 0.6.  Is there a reason
> in particular you want this patch applied?

Maybe I should have asked earlier. As this bug is rather annoying and we've got a Fedora bug for it (https://bugzilla.redhat.com/show_bug.cgi?id=1121306), we apply the fix also to the 0.6 packages.
Comment 7 Jim Nelson 2014-08-29 02:13:19 UTC
I didn't realize this bug was causing all the problems mentioned in the ticket.  Do you need a patch applied to the branch, or do we need to roll another tarball?
Comment 8 Jim Nelson 2014-08-29 19:53:20 UTC
I've pushed this commit to the geary-0.6 branch.  We're going to roll an 0.6.3 release soon, so this will be in that as well.
Comment 9 Jim Nelson 2014-09-03 00:12:20 UTC
Now available in Geary 0.6.3.