Hello Guys,
I'm in dire need of help.
After the DST changes yesterday, all appointments schedules are off by 1 hour. I have already downloaded and installed the latest DST patch for 2008, restarted the server, restarted IIS but the problem remains. Our company relies heavily on our Web Schedulling application and any help or suggestions will be greatly appreciated.
Regards,
Jason
Yeah, using a consistent offset is the solution. We were previously detecting the current offset on the client via JS and applying that to the WebScheduleInfo object. That caused problems when an appointment was made in standard time and viewing it during DST (and vice versa). Now we save all our appointments with the standard time offset and that solved our problems.
Hi,
Basically you need to make sure that you're always using a consistent timezone offset. Since your server's time changed the TimeZoneOffset changed as well, which caused some of your appointments to be an hour off. If possible, the simplest solution might be to keep your TimeZoneOffset to whatever value it was before the DST occurred, and adjust any appointments in your DB since then.
-SteveZ
I'm not sure I understand your solution.
Are you suggesting that we need to keep track of when events were added and then modify this TimeZoneOffset in order to spoof the control into thinking it's the correct time? Or do we just need to keep track of when DST has occurred?
You comment of "All you should need to do, is set the TimeZoneOffset to what it was before the DST was applied" sounds to me like next time the DST changes I will need to go back into my code and change this TimeZoneOffset back to what it was before? This doesn't sound like a very practical solution.
Do I just need to keep track of the current status of DST and then adjust the TimeZoneOffset accondingly? Here some example code of how I am attempting to solve this problem, although it seems like something that should be part of the control already.Any feedback on this would be helpful.
if (DateTime.Now.IsDaylightSavingTime()) myWebScheduleInfo.TimeZoneOffset = new TimeSpan(Properties.Settings.Default.LocalTimeZone, 0, 0);else myWebScheduleInfo.TimeZoneOffset = new TimeSpan(Properties.Settings.Default.LocalTimeZone - 1, 0, 0);
I have a similar problem..
Appointments raised in the same DST part of the year are all perfect, but when you look at OLD appointments (prior to the DST change) thay are out by an hour. Same issue for future appointments beyond DST change
I have a call open and the the last suggestion was to use a prerender event to change the start/end time - but I still have problems with the tooptip and how its displayed on the control - but Im still working on it.
Maybe you can get it working - here is the prerender event so far... (not working :( - but a starter for 10) - you need the following namespaces
using System.Globalization;using Infragistics.WebUI.WebSchedule;
protected void WebScheduleInfo1_PreRender(object sender, EventArgs e) { // deal with daylight saving time TimeZone localZone = TimeZone.CurrentTimeZone; DaylightTime daylight = localZone.GetDaylightChanges(DateTime.Now.Year);
this.WebScheduleInfo1.DataBind(); foreach (Appointment a in this.WebScheduleInfo1.Appointments) { if (a.StartDateTime >= daylight.Start && a.StartDateTime <= daylight.End) { a.StartDateTime = a.StartDateTime.Add(daylight.Delta); } } }
Anyone suggest how to get the tooltip and the render event to work properly???
Cheers
Peter
Hey Jason,
WebscheduleInfo actually has a property called TimeZoneOffset. If a user doesn't set it, it defaults the the server time. Since i'm assuming your server time had DST applied, all of your appointments will be off 1 hour. All you should need to do, is set the TimeZoneOffset to what it was before the DST was applied, and you should be good to go.
Hope this helps,