C# Class SIPSorcery.Entities.TimeZoneHelper

Datei anzeigen Open project: sipsorcery/sipsorcery

Public Methods

Method Description
ApplyOffset ( string dateTimeOffsetStr, int offset ) : System.DateTime

Applies a minutes offset to a date time offset.

GetTimeZonesUTCOffsetMinutes ( string timezoneStr ) : int

Returns the offset minutes from UTC time for a timezone. This method is typically used to convert times that are stored in the database as UTC time to a user's local time.

Method Details

ApplyOffset() public static method

Applies a minutes offset to a date time offset.
public static ApplyOffset ( string dateTimeOffsetStr, int offset ) : System.DateTime
dateTimeOffsetStr string Must be a valid DateTimeOffset. Typically this calue should be coming from the database.
offset int The offset in minutes to apply to the time string.
return System.DateTime

GetTimeZonesUTCOffsetMinutes() public static method

Returns the offset minutes from UTC time for a timezone. This method is typically used to convert times that are stored in the database as UTC time to a user's local time.
public static GetTimeZonesUTCOffsetMinutes ( string timezoneStr ) : int
timezoneStr string The timezone to get the offset from UTC for.
return int