For me ToUniversalTime(), returns wrong time only,
I have tried in system X, I am getting wrong time.
To ensure a timely and accurate response, please attach the following resources here for testing:
- Your input email message.
- Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.
As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.
PS: To attach these resources, please zip and upload them.
Hi,
In My local development gives correct date&time without using ToUniversalTime(). When I deployed same application into another server, the time will be differ.
Here is my code:
MapiMessage msg = new MapiMessage();
var mailstring = string.Empty;
using (MemoryStream stream = new MemoryStream(attachment.CAAAttachment))
{
stream.Seek(0, SeekOrigin.Begin);
msg = MapiMessage.FromStream(stream);
attachment.CAADisplayDate = msg.DeliveryTime;
}
06/28/2022 17:40 -> Email Delivered original Date&Time
06/28/2022 08:10:18 AM -> without using universedate(), I gets this Date&Time
6/28/2022 12:10:18 PM -> With using universedate(), I gets this Date&Time
When I try to get Delivery Date & Time from .eml files in system X, I gets the time wrong.
can you please help me
Please find below image
image.png (4.5 KB)
image.png (7.9 KB)
Note 1: In my local working fine, But we deploy to server and try again time will differ
Note 2: ToUniversalTime() this function also gives wrong time
I have transferred your topic to the Aspose.Email support forum and the developers there can help to confirm your question for you.
Could you please share the time zones and operating systems detail where you are testing this case?
I am in india But server is in US(I don’t know exact time zone),
operating systems : windows
Can you please provide some idea for solving the issue.
I check again from India, I gets below results, can you check that,
Time Variation By Aspose.email.png (43.1 KB)
i don’t know why 9hours 30 mins added for each and every document, I uploaded
To ensure a timely and accurate response, please attach the following resources here for testing:
- Your input email message.
- Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.
As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.
PS: To attach these resources, please zip and upload them.
Find below my standalone application
AsposeEmailMVCProject.zip (5.6 MB)
Sample Input :
image.png (231.9 KB)
I could not upload my .eml sample input
Okay Thanks.
We have tested the scenario using the latest version of Aspose.Email for .NET 22.6 and have not faced any issue with MapiMessage.DeliveryTime. Please check the attached images for detail.
messge.png (25.6 KB)
code.png (74.4 KB)
Regarding “Exception in myassociationready.com.eml”, we have not faced any exception using the shared code example.
I already said that, In my local It is working fine. But When I tested from another server I gets time differ.
When I deployed my solution into client server, then try to upload the .eml document from India, I gets wrong time.
Note: Client server is in US.
Aspose.Email returns the MapiMessage.DeliveryTime correctly. Most probably this issue is not related to Aspose.Email. Could you please share the following detail for further testing?
- The log files that you are creating at your local system and client server.
- Please only get the MapiMessage.DeliveryTime at your local system can client server and share if both values are different.
- Please execute the following code example at your local system can client server and check the output values. This code example does not use Aspose.Email.
DateTime localDateTime, univDateTime;
Console.WriteLine("Enter a date and time.");
string strDateTime = "6/27/2022 3:17:41 PM";
localDateTime = DateTime.Parse(strDateTime);
univDateTime = localDateTime.ToUniversalTime();
Console.WriteLine("{0} local time is {1} universal time.",
localDateTime,
univDateTime);
Testing is going on by Client, Once testing completed, I will Provide the Information of you asked
Thanks for your feedback. As soon as you get requested information ready, we will start investigation into your issue and provide you more information.
It working fine. Thanks for reply.