index_record sent_date

David Carter dpc22 at cam.ac.uk
Fri Dec 28 11:22:08 EST 2007


Mostly idle curiosity:

Why is index_record.sent_date always set to midday on a given day?

This is most obvious in the output from unexpunge -l:

         Sent: Fri Dec 21 12:00:00 2007  << This line
         Recv: Fri Dec 21 14:51:58 2007
         Expg: Fri Dec 28 16:01:58 2007

My first thought was that this was a bug in my new improved reconstruct, 
but it turns out to just be the way message_parse_date() calculates dates.

   time_t
   message_parse_date(hdr, flags)
   {
       /* ... */
       message_parse_rfc822space(&hdr);
       if (hdr && (flags & PARSE_TIME)) {
            /* ... */
       }
       else
    badtime:
            tm.tm_hour = 12;

As far as I can see from a quick grep, ipurge is the only thing which uses 
sent_date. I don't use ipurge, so I may be missing some subtlety.

-- 
David Carter                             Email: David.Carter at ucs.cam.ac.uk
University Computing Service,            Phone: (01223) 334502
New Museums Site, Pembroke Street,       Fax:   (01223) 334679
Cambridge UK. CB2 3QH.


More information about the Cyrus-devel mailing list