Time zones of different countries

I am creating a website on which service providers can create their own schedule (date and time), in which they can provide the service, and the client can book them. but the problem is that the service providers are from different countries. therefore their problem is in the time zone. please give me a solution for this, that I have to convert the time of the service providers (when inserting the schedule) into GMT in javascript (on the client side) or in a CS file (on the server side), how to manage all this? How to handle time zones correctly? If I convert it on the client side, the problem is that the client may have set the wrong time zone on my PC ... and if I convert it on the server side .. how to manage .. how to show this to the service providers their schedule and for customers accordingly? I am using asp.net (VS 2005) and sql server.

+3
source share
2 answers

Save time in GMT, as it does not suffer from problems with daily savings. Convert to this and saved time in the client’s time zone.

See this Question SO (Daylight Saving Time - Make and Add) for a variety of pointers and resources.

+2
source

Good question, I also thought about this:

Design a user timezone offset in javascript and use it to:

1) Save together with the GMT / UTC date in the database (maybe too much overhead) 2) To create a DateTimeOffset that was saved in the database as DateTimeOffset Type in SQL SERVER 2008, the best solution, I think.

, , .

?

+1

Source: https://habr.com/ru/post/1745925/


All Articles