I have a DateTime
column field in Sql
which is storing Values as UTC
. Now I have a requirement where in my reports I have to convert the UTC
into Local Time
as per the geographical location from where User is accessing the report.
Now I know that ToLocalTime()
will convert it into required but at the same time it will convert to the place where application is deployed i.e Server not the User's Geo location .
Here is my code snippet ..
<td>@string.Format("{0:yyyy-MMM-dd HH:mm:ss}", user.StatusDateTime.ToLocalTime())</td>
I am using Razor
View and javascript
/jquery
in User interface.
What would be the possible solution ?