I have one application that needs a server to process a client request.
In this application, time is very important.
Whenever a client requests something, I would like to save the request time.
The problem is that my server is in the USA and the client is in Australia.
How can I change server time to client time and store it in the database.
This should be accurate even in daylight.
How can i achieve this
Ok, I save the time in the database as UTC.
On the client side, I have this code,
DateTime dt = booking.CreateDateTime.Value; var localTime = TimeZone.CurrentTimeZone.ToLocalTime(dt);
When I print this localTime, it is 7 hours faster than local time.
How can I change this time to local time?
source share