We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

ImapMessageInfo.Date is offset


I've written a little tool that uses Aspose.Email to parse a Gmail inbox and process all messages.

I noticed the Date property of the ImapMessageInfo is always off by 2 hours. When I open the mail header (see below) it shows "09:18:07 +0200", but when I run it through the tool, the Date comes as "07:18".

I understand this is related to the +0200. It's as if the ImapMessageInfo reverts the +02 to the original GMT-time?

Since the email could come from a different timezone, I can't just add 2 hours and be done with it. How can I access the exact date as it appears in the email header?

Kind regards,
Jeroen Vantroyen

The original header :
Delivered-To: cs@xxxxxxx.xx
Received: by with SMTP id n66csp24748yka;
Fri, 12 Sep 2014 00:18:26 -0700 (PDT)
X-Received: by with SMTP id ka6mr6395583igb.48.1410506305741;
Fri, 12 Sep 2014 00:18:25 -0700 (PDT)
Received: from mail-ig0-f179.google.com (mail-ig0-f179.google.com [])
by mx.google.com with ESMTPS id f18si3817749icg.50.2014.
(version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
Fri, 12 Sep 2014 00:18:25 -0700 (PDT)
Received-SPF: pass (google.com: domain of isabelle@xxxxxxx.xx designates as permitted sender) client-ip=;
Authentication-Results: mx.google.com;
spf=pass (google.com: domain of isabelle@xxxxxxx.xx designates as permitted sender) smtp.mail=isabelle@xxxxxxx.xx
Received: by mail-ig0-f179.google.com with SMTP id r10so57057igi.0
for ; Fri, 12 Sep 2014 00:18:25 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20130820;
X-Gm-Message-State: ALoCoQkUIcxgRnKz2h9rdD8I3Gv+M6yfFIsBA7BjGsDd3fShhiZX94aIlHjDSK+oWOuVKhH6Vclq
X-Received: by with SMTP id yr7mr14042115igb.37.1410506304745;
Fri, 12 Sep 2014 00:18:24 -0700 (PDT)
From: Isabelle
References: <16E11FA974B21544B6EE209FAC29688263684E@EXCHANGE2K10-1.province.luxembourg.net>
<43e9738a06ac4d1a461f68542e713a81@mail.gmail.com> <16E11FA974B21544B6EE209FAC2968826388E6@EXCHANGE2K10-2.province.luxembourg.net>
In-Reply-To: <16E11FA974B21544B6EE209FAC2968826388E6@EXCHANGE2K10-2.province.luxembourg.net>
MIME-Version: 1.0
X-Mailer: Microsoft Outlook 15.0
Thread-Index: AQDgGxhVcxLP30tqEqj8eHcfEIToOgE32eRgAjITWtSdwS3AwA==
Date: Fri, 12 Sep 2014 09:18:07 +0200
Subject: =?UTF-8?Q?TR=3A_Balise_march=C3=A9_de_travaux=2E?=
To: CS@xxxxxxx.xx

Hi Jeroen,

Thank you for writing to Aspose support team.

The Date property of ImapMessageInfo shows the time in GMT and the Timezone offset is not available in the ImapMessageInfo. The TimeZone offset resides in the MailMessage’s TimeZoneOffset that is available once the message is fetched, which can then be used to determine the message time.

Code Used:

using (ImapClient imap = GetAsposeImapClient())



var infos = imap.ListMessages();

Console.WriteLine("Total Messages: " + infos.Count);

foreach (var info in infos)


Console.WriteLine(info.Date + ", " + info.InternalDate);

using (var message = imap.FetchMessage(info.UniqueId))


Console.WriteLine(message.Date + message.TimeZoneOffset);






I didn’t need the actual message, so I didn’t look far enough for my date.

Thanks for the quick response!

Hi Jeroen,

I hope the shared solution is helpful to you. Please feel free to write to us if you have any further query/inquiry in this regard.