I am working on an application whose target audience is worldwide. My development platform is the ASP.Net/Sql server, which is currently hosted on the same stand-alone server.
It is possible that Sql Server may be migrated to a different server and web application for hosting on different servers. The time zone may differ for both servers.
We are currently in development and should be working on the concept of Universal Date, rather than fighting at a later stage.
Our database currently has the following column type for date and time.
DateTime (mm / dd / yyyy hh: MM: ss), SmallDateTime (contains only date, mm / dd / yyyy 12:00:00), Varchar (contains hhMMss only in 24-hour format)
Currently, we save the GetDate () of the Sql server , DateTime.Now of C # , i.e. ASP.NET, javascript datetime and any other date directly. There is currently no UTC conversion or anything like that. At the moment, we do not save any TimeZone or any offset.
How to handle DateTime related issues when
A stored procedure call to save the DateTime from the user interface to the database
Display data from stored procedure in user interface
Display data from ASP.NET server for client browser
Save data from client browser to ASP.NET server
Please offer some code examples for each of these cases along with the Summer Time function.
source share