Click or drag to resize
TimeZoneHelperConvertTimeZoneDateTime Method
Returns DateTime according timezone information.

Namespace: CMS.Globalization
Assembly: CMS.Globalization (in CMS.Globalization.dll) Version: 10.0.0
Syntax
C#
public static DateTime ConvertTimeZoneDateTime(
	DateTime dateTime,
	TimeZoneInfo srcTimeZoneInfo,
	TimeZoneInfo destTimeZoneInfo,
	bool timeZonesRequired = true
)

Parameters

dateTime
Type: SystemDateTime
Source datetime
srcTimeZoneInfo
Type: CMS.GlobalizationTimeZoneInfo
Source timezone
destTimeZoneInfo
Type: CMS.GlobalizationTimeZoneInfo
Destination timezone
timeZonesRequired (Optional)
Type: SystemBoolean
If true than the time is converted only if timezones are enabled in the system

Return Value

Type: DateTime
See Also