What is the best way to show LocalTime for a DateTime set to UTC?
I'm currently using ASP.NET MVC3 and MongoDB for a web app. MongoDB uses UTC and the server hosting the app is also using UTC. If I use DateTime.ToLocalTime() in the View that will just return the server's time which is still in UTC.
I would like to display the DateTime objects that a user interacts w开发者_如何学Pythonith in their Local time, does anyone know the best method for achieving this?
Thanks in advance.
I guess at this answer on google groups you should find answer on your question
精彩评论