Hi,
I create appointments using Aspose.Network. Every change of winter and summertime, i need to change the time of the new appointments, because they are 1 hour wrong.
Does somebody know how i can fix this issue instead of changing my code every 6 months?
This is my code if you need it:
AsposeMail.MailMessage msg = new AsposeMail.MailMessage();
msg.From = new AsposeMail.MailAddress(t.AssignedUser.Email,"CRM");
AsposeMail.MailAddressCollection attendees = new AsposeMail.MailAddressCollection();
attendees.Add(new AsposeMail.MailAddress(t.AssignedUser.Email));
msg.Bcc.Add(new AsposeMail.MailAddress(ConfigurationSettings.AppSettings["SendAppointmentToClientBCC"].ToString()));
msg.To = attendees;
// This line is now for wintertime
AsposeMail.Appointment appoinment = new AsposeMail.Appointment("", t.TaskDate, t.TaskDate, msg.From[0], attendees);
// This line is for summertime
//AsposeMail.Appointment appoinment = new AsposeMail.Appointment("", t.TaskDate.AddHours(-1), t.TaskDate, msg.From[0], attendees);
appoinment.Description = getDescription(t);
appoinment.Summary = GetSubject(t);
appoinment.Location = GetLocation(t);
appoinment.UniqueId = "YRM" + t.Id;
msg.Subject = GetSubject(t) ;
if(isCancel)
msg.AddAlternateView(appoinment.CancelAppointment(1));
else
msg.AddAlternateView(appoinment.RequestApointment(0));
AsposeMail.SmtpClient smtp = new AsposeMail.SmtpClient(ConfigurationSettings.AppSettings["smtp"]);
smtp.Send(msg);