问题
I have an application in which I am displaying time fields in EST, I need to convert them to respective time zones , DAYLIGHT saving need to be considered.
How can I change to different time zone provided I have EST time and Time Zone to which it needs to get converted
I have to consider Daylight saving On/Off and have to apply Off set.. how can I > any working examples..
Example : I want to convert 3:15 PM which is in EST , needs to be converted to PST
回答1:
I would recommend using DateTimeOffset to make sure that your DaylightSaving is always right. You can also Convert the DateTimeOffset to different time zone with the TimeZoneInfo.ConvertTime static method of the TimeZoneInfo class.
来源:https://stackoverflow.com/questions/18134202/how-to-convert-est-to-other-times-zonespst-cst-mst-considering-daylight-saving