Click or drag to resize
TimeZoneHelper Class
Static timezone accessing methods.
Inheritance Hierarchy

Namespace: CMS.Globalization
Assembly: CMS.Globalization (in CMS.Globalization.dll) Version: 8.2.23
Syntax
C#
public class TimeZoneHelper : CoreMethods

The TimeZoneHelper type exposes the following members.

Constructors
  NameDescription
Public methodTimeZoneHelper
Top
Methods
  NameDescription
Public methodStatic memberConvertDataSet
Converts the DateTime columns values of the DataSet to user datetime.
Public methodStatic memberConvertDataTable
Converts the DateTime columns of the table values to user datetime.
Public methodStatic memberConvertTimeToUserTime
Returns user date time in dependence on user time zone from specified DateTime a TimeZone.
Public methodStatic memberConvertTimeToUTC
Returns UTC date time in dependence on given time zone.
Public methodStatic memberConvertTimeZoneDateTime
Returns DateTime according timezone information.
Public methodStatic memberConvertToServerDateTime(DateTime, ISiteInfo)
Returns server date time in dependence on server time zone.
Public methodStatic memberConvertToServerDateTime(DateTime, IUserInfo)
Returns server date time in dependence on server time zone.
Public methodStatic memberConvertToServerDateTime(DateTime, TimeZoneInfo)
Returns server date time in dependence on server time zone.
Public methodStatic memberConvertToSiteDateTime(DateTime, ISiteInfo)
Returns site date time in dependence on site time zone.
Public methodStatic memberConvertToSiteDateTime(DateTime, ISiteInfo, TimeZoneInfo)
Returns site date time in dependence on site time zone.
Public methodStatic memberConvertToUserDateTime(DateTime, IUserInfo)
Returns user date time in dependence on user time zone.
Public methodStatic memberConvertToUserDateTime(DateTime, IUserInfo, TimeZoneInfo)
Returns user date time in dependence on user time zone.
Public methodStatic memberConvertToUserTimeZone
Returns string representing of given time converted into user date time (site or server).
Public methodStatic memberGetCurrentTimeZoneDateTimeString
Returns string representation of the given date/time converted to user, site or server time zone.
Public methodStatic memberGetSiteDateTime
Returns user current date time in dependence on user time zone.
Public methodStatic memberGetTimeZoneInfo(Int32)
Returns timezone info.
Public methodStatic memberGetTimeZoneInfo(String)
Returns timezone info.
Public methodStatic memberGetTimeZoneInfo(ISiteInfo)
Returns site timezone.
Public methodStatic memberGetTimeZoneInfo(IUserInfo)
Returns user timezone.
Public methodStatic memberGetTimeZoneInfo(IUserInfo, ISiteInfo)
Returns timezone of given user or site timezone is the user one is not set. If also site timezone is not set then server timezone is returned.
Public methodStatic memberGetTimeZoneManager
Gets the time zone manager for the given control.
Public methodStatic memberGetUserDateTime
Returns user current date time in dependence on user time zone.
Public methodStatic memberGetUTCLongStringOffset(TimeZoneInfo)
Returns "long" string representation of time zone shift in form '(UTC + 00:00) TimeZoneDisplayName'.
Public methodStatic memberGetUTCLongStringOffset(IUserInfo, ISiteInfo)
Returns "long" string representation of used time zone (user, site or server) in form '(UTC + 00:00) TimeZoneDisplayName'. Returns null if time zones are disabled.
Public methodStatic memberGetUTCStringOffset
Returns string representation of time zone shift in form '(UTC + 00:00)'.
Top
Extension Methods
  NameDescription
Public Extension MethodAsValue
Converts object to a query value which can be used as a query parameter
(Defined by QueryExtensions.)
Public Extension MethodGetAPIString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodGetString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodToBoolean
Returns the boolean representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDateTime
Returns the DateTime representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDouble
Returns the double representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToGuid
Returns the Guid representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToInteger
Returns the integer representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToString
Returns the string representation of an object or default value if not.
(Defined by CoreExtensions.)
Top
Properties
  NameDescription
Public propertyStatic memberServerTimeZone
Returns server timezone.
Public propertyStatic memberTimeZonesEnabled
Returns true if global CMSTimeZonesEnable setting key is true.
Top
See Also