TimeZoneHelperGetCurrentTimeZoneDateTimeString Method |
Returns string representation of the given date/time converted to user, site or server time zone.
Namespace: CMS.GlobalizationAssembly: CMS.Globalization (in CMS.Globalization.dll) Version: 13.0.131
Syntax 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:
StringSee Also