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
Thanks Brian. :)
Thanks Aaron .
This solved my problem.
Thanks a lot.I spent many hours over this issue.Now with ur help I solved it.
Thanks again.
Chetna said:Also please tell me the use of Calinfo.DataBindingsForAppointments??????????????????
See 'WinSchedule Database Demo' sample
I don't know why you would still be having these issues.
Here are my subroutines which fix the problem.
' Returns an ADO.NET DataSet. 'Generic GETDATA. Returns Dataset Public Function GetDataSet(ByVal szSQL As String) As DataSet Try Dim sqlConn As SqlConnection = OpenDatabase() With sqlConn Dim SQLcommand As SqlCommand = New SqlCommand(szSQL, sqlConn) Dim adapter As SqlDataAdapter = New SqlDataAdapter(szSQL, sqlConn) Dim ds As DataSet = New DataSet Try adapter.Fill(ds) CloseDatabase(sqlConn) SetDateColumnsSerializationMode(ds) Return ds Catch ex As Exception Return Nothing Finally CloseDatabase(sqlConn) End Try End With Catch ex As Exception Return Nothing End Try End Function
Private Overloads Sub SetDateColumnsSerializationMode(ByRef ds As DataSet) Try If ds IsNot Nothing Then For Each dt As DataTable In ds.Tables SetDateColumnsSerializationMode(dt) Next Else Throw New Exception("Passed Dataset = NOTHING. Can't set date columns serialization on columns which do not exist.") End If Catch ex As Exception LogException(Ex) Throw Ex End Try End Sub
Private Overloads Sub SetDateColumnsSerializationMode(ByRef dt As DataTable) Try If dt IsNot Nothing Then For Each col As DataColumn In dt.Columns If col.DataType Is GetType(System.DateTime) Then col.DateTimeMode = DataSetDateTime.Unspecified End If Next End If Catch ex As Exception LogException(ex) Throw New Exception("Unable to set Date Column Serialization. Original Message = " & ex.Message, ex.InnerException) End Try End Sub
So as you can see... In my generic GetData routine... before the function returns the dataset it sets the DateTimeMode for each DateTime column in the dataset/datatable.
Copy and paste and see how you go.
As for your other question about how to use the DataBindingsForAppointments you should open up a NEW Thread, but before you do that have a quick search in the forum for posts that already exist relating to this very question and/or refer to the Database Demo and Documentation.
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.