Click or drag to resize
TimeZoneHelperGetCurrentTimeZoneDateTimeString Method
Returns string representation of the given date/time converted to user, site or server time zone.

Namespace: CMS.Globalization
Assembly: CMS.Globalization (in CMS.Globalization.dll) Version: 11.0.0
Syntax
C#
public static string GetCurrentTimeZoneDateTimeString(
	DateTime dt,
	IUserInfo ui,
	ISiteInfo si,
	out TimeZoneInfo usedTimeZone,
	string format = null
)

Parameters

dt
Type: SystemDateTime
Server DateTime value
ui
Type: CMS.BaseIUserInfo
Current user info
si
Type: CMS.BaseISiteInfo
Current site info
usedTimeZone
Type: CMS.GlobalizationTimeZoneInfo
Used time zone
format (Optional)
Type: SystemString
Output format

Return Value

Type: String
See Also