I am creating a web site which in which the service providers can create their schedule (date and time) at which they can provide service and client can book them. but the problem is that service providers are from different countries. so their is Time zone problem. please give me a best solution for it, that i should convert the time of service providers (while inserting schedule) to GMT in javascript (client side) or in my CS file (server side) how to manage all this.. plez give me a link of any such demo in which time zone are handled properly.... if i converts it at client side then problem is that may be client have set wrong time zone on his pc... and if i convert it at server side.. than how to manage .. how to show it to service providers their schedule and to clients accordingly.. please help me out.. i am using asp.net (VS 2005) and sql server.
+2
A:
Save times in GMT, as it does not suffer from daylight savings issues. Convert to and from this saved time to the timezone of the client.
See this SO question (Daylight saving time - do and don’ts) for lots of pointers and resources.
Oded
2010-05-18 06:07:32
Good point on the daylight savings time.
Mark Redman
2010-05-18 06:08:45
+1
A:
Good question, I have been thinking about this too:
Work out the users timezone offset in javascript and use this to:
1) Save alongside a GMT/UTC date in the database (probably too much overhead) 2) To create a DateTimeOffset which saved to the database as a DateTimeOffset Type in SQL SERVER 2008, a better solution I think.
This means you know the Date and the timezone it was saved in.
Then display a calculated date based on the users Date Format and Timezone preference?
Mark Redman
2010-05-18 06:08:02