As far as I can see, I'm receiving 4 date fields from my mail server.
date
and/or Date
- time when email were sent.
MailDate
and udate
- time when email were received by my mail server.
Everything is clear with receiving time, since I have unix timestamp (udate).
The question is how to handle, how to convert in unix timestamp, sent time, since it could be in different formats. E.g. "Sat, 10 Mar 2015 11:26:43 +0100" and "Вто, 10 Декабря 2014 11:26:43 +0100 (12/10/2014 11:26:43 PM)" and "Lundi, 10 août 2014 11:26:43 +0800 (PST)" etc.
Is there any solution to reliably convert sent time in unix timestamp, or I should use it just as a string?