#362 Reformat non RFC822 date into RFC order

open
nobody
5
2005-04-07
2005-04-07
fas
No

We are suffering from an application which sends out
emails with the Date: header in non RFC822 format, the
fields are actually in linux "date" format. This causes
SquirrelMail to display the emails with "Unknown Date"
and suffle them to the bottom of a date ordered
display. While waiting for the broken application to
be fixed I have created this patch to
functions/date.php from v1.4.4 which shuffles the date
fields back into RFC822 order. It creates a function
FixBadDate() which is fed by getTimeStamp(), if the
date is already RFC compliant then it is a null
operation, for dates in the "wrong" order it can fix
the order. At best is fixes the date, at worst you are
no worse off as Squirrel wouldn't have displayed the
date correctly anyway.

Discussion

  • fas
    fas
    2005-04-07

    Patch file for functions/date.php from v1.4.4

     
    Attachments
  • Logged In: YES
    user_id=285765

    Thank you for your patch. While I can see the value, I'm a
    bit hesitant to apply it. It adds quite some complexity to
    the processing of mailbox lists, which already is quite
    intensive (esp when server side sorting is disabled). What
    do others think?

     
  • fas
    fas
    2005-04-07

    Logged In: YES
    user_id=1025098

    No problem, I don't really anticipate needing it myself for
    very long, though you never know how long it will take a
    commercial outfit to fix their software. I just thought I'd
    share it in case it was useful. This was the first case I've
    come across of a bad date header so maybe it's not that
    widely needed.