Setting the Time Zone on Appointments

I am using Aspose.Email version 1.9.0.0 for .Net 4.0.

I am setting the time zone using the Appointment.SetTimeZone() method to set it to "America/New_York", but the resultant .ics file seems to be taking the system time zone.

What am I doing wrong?

Please see attachments.

The class file contains the SendAppointment() method, which calls AddAppointment(), which calls GetTimeZone() using an offset from CST that we store in the web config.

The jpg shows that the Appointment object seems to have the correct time zone info set.

The invites.ics.txt file is the attachment sent.

Hi,

Thank you for using Apose.Email and we are sorry for a delayed response.

After an initial investigation, I was able to reproduce the issue at our end with the following lines of code and using latest version: Aspose.Email for .NET v2.0.0 1.

MailMessage msg = new MailMessage();
msg.From = "sender@abc.com"; //set the sender
msg.To = "reciever@xyz.com"; //set the reciever

Appointment app = new Appointment(
    "Room 112", //location
    new DateTime(2012, 8, 2, 13, 0, 0), //start time
    new DateTime(2012, 8, 2, 14, 0, 0), //end time
    msg.From,//organizer
    msg.To //attendee
);

app.SetTimeZone("America/New_York");
app.Summary = "Release Meetting";
app.Description = "Discuss for the next release";
app.UpdateAppointment();
msg.AddAlternateView(app.RequestApointment());

const string mailboxUri = "ExchangeServerAddress";
const string domain = @"";
const string username = @"UsrName";
const string password = @"Password";

NetworkCredential credential = new NetworkCredential(username, password, domain);

using (ExchangeWebServiceClient client = new ExchangeWebServiceClient(mailboxUri, credential))
{
    client.Send(msg);
}

I have forwarded these details to our development team for further investigation and rectification of the bug. You will be notified via this forum thread once the issue is fixed. This issue has been logged in our Issue Tracking System as: NETWORKNET-33371.

The issues you have found earlier (filed as NETWORKNET-33371) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.