0

While saving the data I want the time to be displayed in users local time as of now it is saving in utc.

Code :

NarrativeContentLastModifiedOn = valuation.NarrativeContentLastModifiedOn;

So how do I convert this date time to user's local datetime.

ashish
  • 273
  • 1
  • 5
  • 16
  • 2
    Local `DateTime` values only make sense on desktop. For a web server use `DateTimeOffset`. You can get the users timezone via javascript, or let the user store their preference somewhere. – Jeremy Lakeman Jan 21 '21 at 05:52
  • https://stackoverflow.com/questions/6525538/convert-utc-date-time-to-local-date-time – Gaurav P Jan 21 '21 at 06:56

0 Answers0