In my Sql
database, I have a column storing values as UTC
in a DateTime
field. The requirement now is to convert this UTC
into Local Time
based on the geographical location of the User accessing the report.
I am aware that using ToLocalTime()
will achieve the conversion but it would be to the server's location where the application is deployed, and not the User's Geo location.
This is the code snippet I am currently using:
<td>@string.Format("{0:yyyy-MMM-dd HH:mm:ss}", user.StatusDateTime.ToLocalTime())</td>
My interface uses Razor
View along with javascript
/jquery
. What could be a feasible solution to address this issue?