-2

I have two fields,

CreatedDate

UpdatedDate

It takes from the system date and time.. My sql server is located at UK. So when i see in site it is showing wrong time.. how to change this in mvc?

My details page, i am showing like following,

 <strong>Date Posted:</strong>
            <%:Model.CreatedDate%>

Please give me the ideas?

PoliDev
  • 1,348
  • 9
  • 23
  • 44

1 Answers1

0

I would store your dates using UTC and then use that as a baseline for converting to the appropriate timezone for your region. This makes it flexible since you have a constant reference point.

TGH
  • 37,937
  • 11
  • 96
  • 131