ImapX not registering the right hour and date since 01 March of 2013

Topics: Issues
Mar 4, 2013 at 2:32 AM
Hi there
i use IMAPX to register a database of my inbox of GMAIL but since the start of march for some reason IMAXP is not registering the right Date and TIme

It registers like this:
for example march 02 the time of the email was registerers liek this:
12:00 am

and the date like this:


do you know what happened?

I woud really appreciate your answer becuase i need to register my emaiils :P

Thanks a lot
Mar 4, 2013 at 8:12 AM
Edited Mar 4, 2013 at 8:13 AM
Hi rodolfolopes,

i tested the library using the sample application right now, and the dates are parsed correctly:


The last release of the library was in january, and since that time nothing has changed. Please check your code, maybe you just didn't notice the error.

Best regards,

Pavel Azanov
Mar 13, 2013 at 3:21 PM

I have the same problem since the start of March 2013; the date is parsed to 01/01/0001 0:00:00.

I saw that the problem is in DateTime.TryParse that does not recognize a valid format string.

I wrote a few lines of code to test it out and saw that the problem is in the IFormatProvider passed to DateTime.Parse.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    Dim _date As System.DateTime

    Dim current(8) As String
    current(0) = "Fri, 01 Mar 2013 09:13:54 +0100"
    current(1) = "31 Mar 2013 10:13:00 +0100"
    current(2) = "15 Mar 2013 10:13:54 +0000"
    current(3) = "15 Feb 2013 09:13:54 +0100"
    current(4) = "01 Apr 2013 09:13:54 +0100"        
    current(5) = "01 May 2013 09:13:54 +0100"

    Dim exp As System.Text.RegularExpressions.Regex
    exp = New System.Text.RegularExpressions.Regex("\(.*\)")

    For Each str As String In current
        str = str.Trim()
        Dim exp2 As String = exp.Replace(str, "")

            _date = DateTime.Parse(exp2.Trim(), New CultureInfo("en", False))
        Catch ex As Exception
        End Try


End Sub

I work with computers in Italian format and I get the problem.
if I imposed in the DateTime.Parse English format, then it seems that the problem is resolved.

maybe in the next release Pavel can force the type of format in English, so as to not get back the default format of the computer on which you run the application.
Mar 14, 2013 at 9:40 AM
Edited Mar 15, 2013 at 1:43 PM
Hi GDEffe,

thank you for analysing the issue!
I updated the source code in the repository, the date parsing now happens using the CultureInfo.InvariantCulture property.

Please check if you still experience any issues, and let me know.

The binaries in the download section will be updated with the next release.

Best regards,

Pavel Azanov