A BUGNOTE has been added to this bug.
======================================================================
http://www.dbmail.org/mantis/bug_view_advanced_page.php?bug_id=0000211
======================================================================
Reported By:                frerichs
Assigned To:                paul
======================================================================
Project:                    DBMail
Bug ID:                     211
Category:                   IMAP daemon
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     confirmed
======================================================================
Date Submitted:             27-May-05 17:58 CEST
Last Modified:              30-Jun-05 13:14 CEST
======================================================================
Summary:                    date_slq2imap does not output RFC compliant dates 
(probably DB dependant)
Description: 
The dates are not in fact converted to the date format mandated in RFC
2822, ie

date-time       =       [ day-of-week "," ] date FWS time [CFWS]

day-of-week     =       ([FWS] day-name) / obs-day-of-week

day-name        =       "Mon" / "Tue" / "Wed" / "Thu" /
                        "Fri" / "Sat" / "Sun"

date            =       day month year

year            =       4*DIGIT / obs-year

month           =       (FWS month-name FWS) / obs-month

month-name      =       "Jan" / "Feb" / "Mar" / "Apr" /
                        "May" / "Jun" / "Jul" / "Aug" /
                        "Sep" / "Oct" / "Nov" / "Dec"

day             =       ([FWS] 1*2DIGIT) / obs-day

time            =       time-of-day FWS zone

time-of-day     =       hour ":" minute [ ":" second ]

hour            =       2DIGIT / obs-hour

minute          =       2DIGIT / obs-minute

second          =       2DIGIT / obs-second

zone            =       (( "+" / "-" ) 4DIGIT) / obs-zone

But instead pops a time zone offset on the end of the date as passed by
SQL, and leaves it at that. In my case, I am using MYSQL and the date ends
up looking like:

2005-05-26 12:34:56 +0100
======================================================================

----------------------------------------------------------------------
 ant9000 - 30-Jun-05 13:14 CEST 
----------------------------------------------------------------------
I've applied the patch, which indeed solves ONE problem: Outlook chokes no
more on the dates - but it does however fail to see the time correctly,
since the constant IMAP_INTERNALDATE_LEN is 30, too short for RFC 2822
compliant dates (it truncates the last 2 bytes).

Moreover, it is possible to have timezones made by a fraction of hour
(that's why timezone variable is in seconds); I've patched the patch to
cope with both problems.

As a sidenote, GNU strftime has a %z extension provided just for the
purpose of outputting RFC2822 date; I've not used in the sake of
portability, but it would
simplify the code quite a bit.

Bug History
Date Modified  Username       Field                    Change              
======================================================================
27-May-05 17:58frerichs       New Bug                                      
27-May-05 17:58frerichs       File Added: dbmail-2.0.4-fixdate.patch            
        
30-May-05 13:18paul           ETA                      none => < 1 day     
30-May-05 13:18paul           Assigned To               => paul            
30-May-05 13:18paul           Projection               none => minor fix   
30-May-05 13:18paul           Status                   new => confirmed    
30-Jun-05 13:14ant9000        Bugnote Added: 0000760                       
======================================================================

Reply via email to