Why are mbox dates converting wrong?

I received a problem report from a customer today that Address Magic Personal was converting the dates in his mbox file to the wrong time in Outlook, but that the dates transferred correctly with our competitors’ products. It’s a rare day that our competitors do a better conversion than we do, so I took a look at the data. The first line in the mbox file (the “mbox time”) looked like this:

From ozt@test.com  Sat Jan 18 19:15:01 1997

You’ll notice that there’s no timezone on this line.  For other dates, such as the sent date and the SMTP received date, the timezone is included. For example:

Date: 18 Jan 97 16:08:00 +0100

Since the mbox line doesn’t have a timezone, Address Magic uses the local timezone. This customer was in a different timezone from where the mbox file had been created, so the dates were transferring with the wrong timezone. You might think that copying the timezone from one of the other lines would make sense, but in fact that is usually wrong because SMTP servers can be anywhere in the world.

With Address Magic Enterprise mbox conversion, you can use the command line parameter “-i IgnoreMailboxDate=1″ to force Address Magic Enterprise to ignore the “From ” line, but this choice does not exist with Address Magic Personal. The workaround is to change your system timezone for the duration of the conversion.

The reason that our competitors’ products worked was that they ignored the mbox time and instead used the last “Received:” time. Since this customer was using webmail, the “Received” time matched the mbox time and so appeared to produce the correct date. In fact, the date would have been wrong for anyone who used POP3 instead of webmail.

There are actually three date fields in an mbox message (which includes Netscape and Thunderbird.) “Date” is the date that the email was sent. “Received” is when the message passed through a particular SMTP server. The “From “ line before each message is the date that the email was written to the mbox file, which matches the Outlook “Received” date (which is NOT the same as the mbox “Received” field.)  There is no way to have Outlook display the “Received” date from the SMTP server.

If you’ve gotten the impression that determining dates is complex, you are right. There are other problems, such as rounding versus truncation, that make it a complex task to determine exactly why any two dates do or don’t match.

Leave a Reply