开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜