This project is archived and is in readonly mode.
ActionMailer only works correctly with sent_on set in in the local time zone
Reported by Joel Chippindale | August 28th, 2009 @ 10:42 AM
When you set the sent_on time on a mail to a time that is not in the local time zone the date in the TMail that is created.
This is because TMail assumes times are in the local time zone.
For example assuming your local time zone is PDT. Setting the sent_on time to Time.local(2004, 12, 12, 1), will give the correct date header "Sun, 12 Dec 2004 01:00:00 -0800". However setting the sent_on time to Time.local(2004, 12, 12, 1).utc, will incorrectly set the date header "Sun, 12 Dec 2004 09:00:00 -0800".
The attached patch fixes this by ensuring the ActionMailer converts times to the local time zone before passing to TMail.
This is a problem in both 2-3-stable and master and the patch should apply cleanly to both.
Comments and changes to this ticket
-
cainlevy October 9th, 2009 @ 10:57 PM
- Tag changed from actionmailer, timezone to 2-3-stable, actionmailer, timezone
Fixed the problem for me. +1
-
cainlevy December 1st, 2009 @ 10:01 PM
- Tag changed from 2-3-stable, actionmailer, timezone to 2, actionmailer, bugmash-patch, timezone
-
Rohit Arondekar October 6th, 2010 @ 06:26 AM
- State changed from new to stale
- Importance changed from to
Marking ticket as stale. If this is still an issue please make a comment with suggested changes, creating a patch with tests, or rebasing an existing patch or just confirming the issue on latest releases/master.
-
Andrea Campi October 16th, 2010 @ 11:37 PM
- Tag changed from 2, actionmailer, bugmash-patch, timezone to 2-3-stable, actionmailer, bugmash-patch, timezone
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>