C# Class SIPSorcery.Entities.TimeZoneHelper

Afficher le fichier Open project: sipsorcery/sipsorcery

Méthodes publiques

Méthode 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 méthode

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.
Résultat System.DateTime

GetTimeZonesUTCOffsetMinutes() public static méthode

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.
Résultat int