Hi,
If I have a Server/Client application which uses WinSchedule & UltraDayView and it is operated in two different timezones..... how can I ignore the timezones???
Eg: Server Timezone = UTC +5 hours Client #1 Timezone = UTC +5 hours Client #2 Timezone = UTC +6 hours
When Client #1 makes an appointment at 8AM....it appears on Client#2 to be at 9AM. Obviously the appointments start/end time is relative to each Client computer..... but how can I stop this happening....
If they make an appointment at 8 at one location then I want it to appear at 8 at all locations REGARDLESS of timezone settings on thier computer?
Unfortunately.... unlike the "UltraWebInfo" there does not seem to be a TimezoneOffset setting.
Any ideas?
regardsAaron
See UltraCalendarInfo.DataBindingsForAppointments.DateMembersSerializationMode
Thanks for your previous post Brian.
I am having a massive problem though... :(
The Problem although it is not an exactly an Infragistics Issue... it is a very relevant problem for users of your controls (the scheduling controls)
The Problem
When you pass an object of the DataSet class to a remote Web service or to a Web service that is in a time zone that is different from the time zone of the calling application, the DateTime columns in a contained table are converted to the equivalent local time. The DateTime columns are converted because the System.Data.DataSet code adjusts to the equivalent local time according to the time zone of the remote computer. For example, if a value of 5:00 is passed from a client computer in Pacific Time to a Web service in Eastern Time, the value in the DataSet object changes to 8:00 in the receiving method of the Web service. This article describes how to work around this problem by passing the time zone information from the client application to the Web service and by adjusting the DateTime columns at the remote computer. The System.Data is the namespace that contains the DataSet class.
The Following article from Microsoft explains this in detail including a workaround. But I have READ and READ and READ this article but still don't know how to implement the workaround.
http://support.microsoft.com/default.aspx?scid=kb;en-us;842545
Unfortunately simply doing the following didn't help me :-(
Brian Fallon"]See UltraCalendarInfo.DataBindingsForAppointments.DateMembersSerializationMode
It seems to be default behaviour anyway. and doing a DateSerializationMode.SerializeDatesAsUniversalTime seemed to screw up the appointments completely.
Somewhere in your library of code... do you have an implementation of a workaround that will solve my problem?
Consider my environment as such
Database --> .NET Remoting --> {{{{{INTERNET}}}}}}} --> Client
The Dataset is created on the SERVER.... NOT on the client as the microsoft article seems to demonstrate.
Any help/advice is greatly appreciated!!!!!!!!!!!!!!!!!
Regards
Aaron
The general solution to this problem is to use the DateTimeKind functionality that was added with CLR2.0. Since you are pushing these DataSets out from the server, and thus have control over that data, you can make sure that all DateTime structs contained therein are marked as being expressed as universal time, i.e., the DateTimeKind is set to 'Utc'. One of the DateTime constructors takes this enumeration as a parameter, so instead of making the server data specific to a particular time zone, make it use universal time for all dates, and push the responsibility of converting those dates to local time down to the client. You would then want to use universal time for the WinSchedule date serialization as well.
Hi Brian,
The solution *I THINK* was to do the following
... ... ...
For Each col As DataColumn In dt.Columns If col.DataType Is GetType(System.DateTime) Then col.DateTimeMode = DataSetDateTime.Unspecified End If Next
Each time I create a datatable on the server... run through the following code and set each datacolumn DATETIMEMODE that has a datatype of DateTime to "UNSPECIFIED"
As intellisense shows.... When using this mode 'Serialization in this mode does not cause an offset"
In the Calinfo.DataBindingsForAppointments I left the DateSerializationMode = LocalTime and it all seems to work perfectly....
Is there anything wrong with what I have done?
RegardsAaron
Hi!!!!!!!!!
I m also having the same problem.When I save my data from one time zone.And then when I fetch saved data from some other time zone.Then it is converted to Local time.I want to prevent it.I want to load the original saved data regardless to the client time zone.Please help me.
I checked ur code to set the DateTimeMode as unspecified.But it is not working correctly.
Also please tell me the use of Calinfo.DataBindingsForAppointments??????????????????
Thanx in advance.
Chetna said:Also please tell me the use of Calinfo.DataBindingsForAppointments??????????????????
See 'WinSchedule Database Demo' sample
Thanks Brian. :)