Closed Bug 486255 Opened 16 years ago Closed 13 years ago

Timezone is displayed incorrectly in outgoing email with SMTP for 1/2 & 3/4 timezones (fixed in Date::Format 2.23)

Categories

(Bugzilla :: Email Notifications, defect)

3.2.3
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.4

People

(Reporter: paul.schulz, Assigned: selsky)

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.8) Gecko/2009032712 Ubuntu/8.10 (intrepid) Firefox/3.0.8
Build Identifier: 3.2.2

The timezone displayed for outgoing emails when using the 'SMTP' mailer are incorrect.

Showing:
  Thu,  1 Jan 1970 09:30:00 +101800

rather than 
  Wed,  1 Apr 2009 15:21:00 +1030

This looks to be a problem with the perl Date::Format module, and the fact that our server is on a 1/2 hour time zone. The Indian timezone is reporting a similar issue: http://rt.cpan.org/Public/Bug/Display.html?id=36494

Switching the outgoing mail to use the 'sendmail' interface solves the problem.


Reproducible: Always

Steps to Reproduce:
1. Change system time to 1/2 hour time zone (+1030, +0530)
2. Set the outgoing mail to use SMTP
3. Send bugzilla email message.
Actual Results:  
Timestamp in email is: Thu,  1 Jan 1970 09:30:00 +101800

Expected Results:  
Should be: Wed,  1 Apr 2009 15:21:00 +1030
This can be reproduced with a perl script..
----
#!/usr/bin/perl -w
use Date::Format;
print time2str("%a, %e %b %Y %T %z");
The problem here is that Time::Zone, which hasn't been updated in forever, is just not up-to-date. The up-to-date TimeZone database in Perl is DateTime::TimeZone.

Basically, we should be using DateTime everywhere instead of Date::Format.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Timezone is displayed incorrectly in outgoing email with 'SMTP' outgoing mail. → Timezone is displayed incorrectly in outgoing email with 'SMTP' outgoing mail for 1/2 & 3/4 timezones
Target Milestone: --- → Bugzilla 4.0
Version: unspecified → 3.2.3
Attached patch v1 (obsolete) — Splinter Review
Assignee: email-notifications → selsky
Status: NEW → ASSIGNED
Attachment #619571 - Flags: review?(LpSolit)
Comment on attachment 619571 [details] [diff] [review]
v1

This problem has been fixed upstream in Date::Format 2.23 in September 2009, see https://rt.cpan.org/Public/Bug/Display.html?id=45067. This version is available in TimeDate 1.17. So we should require Date::Format 2.23 in Bugzilla/Install/Requirements.pm instead of the current 2.21, with a comment explaining why we require 2.23.
Attachment #619571 - Flags: review?(LpSolit) → review-
Note that OpenSUSE, Mandriva/Mageia and Fedora 15 and newer all have TimeDate 1.20, but RHEL/CentOS 6 and older all have TimeDate 1.16, but version 1.17 is required to fix this bug.
Keywords: relnote
OS: Linux → All
Hardware: x86 → All
Summary: Timezone is displayed incorrectly in outgoing email with 'SMTP' outgoing mail for 1/2 & 3/4 timezones → Timezone is displayed incorrectly in outgoing email with SMTP for 1/2 & 3/4 timezones (fixed in Date::Format 2.23)
Manu: could you check if TimeDate 1.17 or above is available in RHEL6, see comment 5.
Attached patch v2Splinter Review
Attachment #619571 - Attachment is obsolete: true
Attachment #624743 - Flags: review?(LpSolit)
Comment on attachment 624743 [details] [diff] [review]
v2

r=LpSolit, with a comment above it explaining why we require 2.23.
Attachment #624743 - Flags: review?(LpSolit) → review+
Flags: approval+
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/Install/Requirements.pm
Committed revision 8230.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
(In reply to Frédéric Buclin from comment #6)
>
> Manu: could you check if TimeDate 1.17 or above is available in RHEL6, see
> comment 5.

Note, RHEL6 contains TimeDate 1.16 (and Red Hat only backports security fixes so I'm guessing it's here to stay). Or do you mean RHEL7?
(In reply to Emmanuel Seyman from comment #10)
> Or do you mean RHEL7?

No, I really meant RHEL6. selsky said that RPMForge has 1.20, so this is fine. But you won't be able to ship Bugzilla 4.4 in RHEL7 if you don't have a newer version of TimeDate.
(In reply to Frédéric Buclin from comment #11)
>
> No, I really meant RHEL6. selsky said that RPMForge has 1.20, so this is
> fine. But you won't be able to ship Bugzilla 4.4 in RHEL7 if you don't have
> a newer version of TimeDate.

I only maintain Bugzilla in Fedora. Xavier Bachelot maintains the Bugzilla that's in EPEL (the third party repo for RHEL/CentOS).
Added to relnotes for 4.4.
Keywords: relnote
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: