hello im mohammed from sri lanka and new to programing so i am litle bit confused these days
So we have a server in srilanka
and we have clients are access to the website from several countries and make reservations
then the server saves the time acording to srilankan time zone so i wont store actual time
i need hep to resolve thease problems Helpme!and serve me!
EG:
client make order at 3.10am from USA
it saves 3.10am and make Oder srilankan time 3.10 am
so i want to atomatically conver to clint country time
how can i code that using C# visual studio 2010
thanks
On the client side convert the time to GMT time using DateTime.ToUniversalTime and store it in your database. Then read it converting as local time zone.
E.g. in your code behind do something on the following lines. Code from MSDN.
to convert it back