Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2094
Handling Different Timezones
posted

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?

regards
Aaron

 

 

Parents Reply
  • 69832
    Offline posted in reply to Aaron Glover

    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.

Children