datetime to string with time zone

前端 未结 5 819
礼貌的吻别
礼貌的吻别 2020-11-30 03:50

I have a DateTime stored in universal time (UTC) of value 2010-01-01 01:01:01.

I would like to display it in EST in this format 2010-01-01 0

5条回答
  •  一个人的身影
    2020-11-30 04:11

    I think you are looking for the TimeZoneInfo class (see http://msdn.microsoft.com/en-us/library/system.timezoneinfo_members.aspx). It has many static methods to convert dates between time zones.

提交回复
热议问题