Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.TimeZoneInfo Class Referencesealed

Classes

class  AdjustmentRule
 
class  CachedData
 
class  OffsetAndRule
 
struct  StringSerializer
 
struct  TransitionTime
 

Public Member Functions

TimeSpan[] GetAmbiguousTimeOffsets (DateTimeOffset dateTimeOffset)
 
TimeSpan[] GetAmbiguousTimeOffsets (DateTime dateTime)
 
TimeSpan GetUtcOffset (DateTimeOffset dateTimeOffset)
 
TimeSpan GetUtcOffset (DateTime dateTime)
 
bool IsAmbiguousTime (DateTimeOffset dateTimeOffset)
 
bool IsAmbiguousTime (DateTime dateTime)
 
bool IsDaylightSavingTime (DateTimeOffset dateTimeOffset)
 
bool IsDaylightSavingTime (DateTime dateTime)
 
bool IsInvalidTime (DateTime dateTime)
 
bool Equals ([NotNullWhen(true)] TimeZoneInfo? other)
 
override bool Equals ([NotNullWhen(true)] object? obj)
 
override int GetHashCode ()
 
bool HasSameRules (TimeZoneInfo other)
 
string ToSerializedString ()
 
override string ToString ()
 
AdjustmentRule[] GetAdjustmentRules ()
 
bool Equals (T? other)
 
void OnDeserialization (object? sender)
 

Static Public Member Functions

static void ClearCachedData ()
 
static DateTimeOffset ConvertTimeBySystemTimeZoneId (DateTimeOffset dateTimeOffset, string destinationTimeZoneId)
 
static DateTime ConvertTimeBySystemTimeZoneId (DateTime dateTime, string destinationTimeZoneId)
 
static DateTime ConvertTimeBySystemTimeZoneId (DateTime dateTime, string sourceTimeZoneId, string destinationTimeZoneId)
 
static DateTimeOffset ConvertTime (DateTimeOffset dateTimeOffset, TimeZoneInfo destinationTimeZone)
 
static DateTime ConvertTime (DateTime dateTime, TimeZoneInfo destinationTimeZone)
 
static DateTime ConvertTime (DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone)
 
static DateTime ConvertTimeFromUtc (DateTime dateTime, TimeZoneInfo destinationTimeZone)
 
static DateTime ConvertTimeToUtc (DateTime dateTime)
 
static DateTime ConvertTimeToUtc (DateTime dateTime, TimeZoneInfo sourceTimeZone)
 
static TimeZoneInfo FromSerializedString (string source)
 
static ReadOnlyCollection< TimeZoneInfoGetSystemTimeZones ()
 
static TimeZoneInfo CreateCustomTimeZone (string id, TimeSpan baseUtcOffset, string? displayName, string? standardDisplayName)
 
static TimeZoneInfo CreateCustomTimeZone (string id, TimeSpan baseUtcOffset, string? displayName, string? standardDisplayName, string? daylightDisplayName, AdjustmentRule[]? adjustmentRules)
 
static TimeZoneInfo CreateCustomTimeZone (string id, TimeSpan baseUtcOffset, string? displayName, string? standardDisplayName, string? daylightDisplayName, AdjustmentRule[]? adjustmentRules, bool disableDaylightSavingTime)
 
static bool TryConvertIanaIdToWindowsId (string ianaId, [NotNullWhen(true)] out string? windowsId)
 
static bool TryConvertWindowsIdToIanaId (string windowsId, [NotNullWhen(true)] out string? ianaId)
 
static bool TryConvertWindowsIdToIanaId (string windowsId, string? region, [NotNullWhen(true)] out string? ianaId)
 
static TimeZoneInfo FindSystemTimeZoneById (string id)
 

Package Functions

TimeSpan GetUtcOffset (DateTime dateTime, TimeZoneInfoOptions flags)
 
bool IsAmbiguousTime (DateTime dateTime, TimeZoneInfoOptions flags)
 
bool IsDaylightSavingTime (DateTime dateTime, TimeZoneInfoOptions flags)
 

Static Package Functions

static TimeSpan GetLocalUtcOffset (DateTime dateTime, TimeZoneInfoOptions flags)
 
static DateTime ConvertTime (DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone, TimeZoneInfoOptions flags)
 
static DateTime ConvertTimeToUtc (DateTime dateTime, TimeZoneInfoOptions flags)
 
static TimeSpan GetUtcOffsetFromUtc (DateTime time, TimeZoneInfo zone, out bool isDaylightSavings, out bool isAmbiguousLocalDst)
 
static DateTime TransitionTimeToDateTime (int year, TransitionTime transitionTime)
 
static bool UtcOffsetOutOfRange (TimeSpan offset)
 
static TimeSpan GetDateTimeNowUtcOffsetFromUtc (DateTime time, out bool isAmbiguousLocalDst)
 

Properties

string Id [get]
 
bool HasIanaId [get]
 
string DisplayName [get]
 
string StandardName [get]
 
string DaylightName [get]
 
TimeSpan BaseUtcOffset [get]
 
bool SupportsDaylightSavingTime [get]
 
static TimeZoneInfo Local [get]
 
static TimeZoneInfo Utc [get]
 

Private Types

enum  TimeZoneInfoResult { Success , TimeZoneNotFoundException , InvalidTimeZoneException , SecurityException }
 

Private Member Functions

AdjustmentRule GetAdjustmentRuleForAmbiguousOffsets (DateTime adjustedTime, out int? ruleIndex)
 
AdjustmentRule GetPreviousAdjustmentRule (AdjustmentRule rule, int? ruleIndex)
 
TimeSpan GetUtcOffset (DateTime dateTime, TimeZoneInfoOptions flags, CachedData cachedData)
 
bool IsDaylightSavingTime (DateTime dateTime, TimeZoneInfoOptions flags, CachedData cachedData)
 
 TimeZoneInfo (string id, TimeSpan baseUtcOffset, string displayName, string standardDisplayName, string daylightDisplayName, AdjustmentRule[] adjustmentRules, bool disableDaylightSavingTime, bool hasIanaId=false)
 
void IDeserializationCallback. OnDeserialization (object sender)
 
void ISerializable. GetObjectData (SerializationInfo info, StreamingContext context)
 
 TimeZoneInfo (SerializationInfo info, StreamingContext context)
 
AdjustmentRule GetAdjustmentRuleForTime (DateTime dateTime, out int? ruleIndex)
 
AdjustmentRule GetAdjustmentRuleForTime (DateTime dateTime, bool dateTimeisUtc, out int? ruleIndex)
 
int CompareAdjustmentRuleToDateTime (AdjustmentRule rule, AdjustmentRule previousRule, DateTime dateTime, DateTime dateOnly, bool dateTimeisUtc)
 
DateTime ConvertToUtc (DateTime dateTime, TimeSpan daylightDelta, TimeSpan baseUtcOffsetDelta)
 
DateTime ConvertFromUtc (DateTime dateTime, TimeSpan daylightDelta, TimeSpan baseUtcOffsetDelta)
 
DateTime ConvertToFromUtc (DateTime dateTime, TimeSpan daylightDelta, TimeSpan baseUtcOffsetDelta, bool convertToUtc)
 
DaylightTimeStruct GetDaylightTime (int year, AdjustmentRule rule, int? ruleIndex)
 
TimeSpan GetDaylightSavingsStartOffsetFromUtc (TimeSpan baseUtcOffset, AdjustmentRule rule, int? ruleIndex)
 
 TimeZoneInfo (in Interop.Kernel32.TIME_ZONE_INFORMATION zone, bool dstDisabled)
 

Static Private Member Functions

static DateTime ConvertTime (DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone, TimeZoneInfoOptions flags, CachedData cachedData)
 
static DateTime ConvertUtcToTimeZone (long ticks, TimeZoneInfo destinationTimeZone, out bool isAmbiguousLocalDst)
 
static bool GetIsDaylightSavings (DateTime time, AdjustmentRule rule, DaylightTimeStruct daylightTime)
 
static TimeSpan GetDaylightSavingsEndOffsetFromUtc (TimeSpan baseUtcOffset, AdjustmentRule rule)
 
static bool GetIsDaylightSavingsFromUtc (DateTime time, int year, TimeSpan utc, AdjustmentRule rule, int? ruleIndex, out bool isAmbiguousLocalDst, TimeZoneInfo zone)
 
static bool CheckIsDst (DateTime startTime, DateTime time, DateTime endTime, bool ignoreYearAdjustment, AdjustmentRule rule)
 
static bool GetIsAmbiguousTime (DateTime time, AdjustmentRule rule, DaylightTimeStruct daylightTime)
 
static bool GetIsInvalidTime (DateTime time, AdjustmentRule rule, DaylightTimeStruct daylightTime)
 
static TimeSpan GetUtcOffset (DateTime time, TimeZoneInfo zone)
 
static TimeSpan GetUtcOffsetFromUtc (DateTime time, TimeZoneInfo zone)
 
static TimeSpan GetUtcOffsetFromUtc (DateTime time, TimeZoneInfo zone, out bool isDaylightSavings)
 
static TimeZoneInfoResult TryGetTimeZone (string id, bool dstDisabled, out TimeZoneInfo value, out Exception e, CachedData cachedData, bool alwaysFallbackToLocalMachine=false)
 
static TimeZoneInfoResult TryGetTimeZoneUsingId (string id, bool dstDisabled, out TimeZoneInfo value, out Exception e, CachedData cachedData, bool alwaysFallbackToLocalMachine)
 
static TimeZoneInfoResult TryGetTimeZoneFromLocalMachine (string id, bool dstDisabled, out TimeZoneInfo value, out Exception e, CachedData cachedData)
 
static void ValidateTimeZoneInfo (string id, TimeSpan baseUtcOffset, AdjustmentRule[] adjustmentRules, out bool adjustmentRulesSupportDst)
 
static TimeSpan GetUtcOffset (TimeSpan baseUtcOffset, AdjustmentRule adjustmentRule)
 
static bool IsValidAdjustmentRuleOffset (TimeSpan baseUtcOffset, AdjustmentRule adjustmentRule)
 
static TimeZoneInfo CreateUtcTimeZone ()
 
static unsafe bool TryConvertIanaIdToWindowsId (string ianaId, bool allocate, out string windowsId)
 
static unsafe bool TryConvertWindowsIdToIanaId (string windowsId, string region, bool allocate, out string ianaId)
 
static void PopulateAllSystemTimeZones (CachedData cachedData)
 
static string GetAlternativeId (string id, out bool idIsIana)
 
static bool CheckDaylightSavingTimeNotSupported (in Interop.Kernel32.TIME_ZONE_INFORMATION timeZone)
 
static AdjustmentRule CreateAdjustmentRuleFromTimeZoneInformation (in Interop.Kernel32.REG_TZI_FORMAT timeZoneInformation, DateTime startDate, DateTime endDate, int defaultBaseUtcOffset)
 
static string FindIdFromTimeZoneInformation (in Interop.Kernel32.TIME_ZONE_INFORMATION timeZone, out bool dstDisabled)
 
static TimeZoneInfo GetLocalTimeZone (CachedData cachedData)
 
static TimeZoneInfo GetLocalTimeZoneFromWin32Data (in Interop.Kernel32.TIME_ZONE_INFORMATION timeZoneInformation, bool dstDisabled)
 
static bool TransitionTimeFromTimeZoneInformation (in Interop.Kernel32.REG_TZI_FORMAT timeZoneInformation, out TransitionTime transitionTime, bool readStartDate)
 
static bool TryCreateAdjustmentRules (string id, in Interop.Kernel32.REG_TZI_FORMAT defaultTimeZoneInformation, out AdjustmentRule[] rules, out Exception e, int defaultBaseUtcOffset)
 
static unsafe bool TryGetTimeZoneEntryFromRegistry (RegistryKey key, string name, out Interop.Kernel32.REG_TZI_FORMAT dtzi)
 
static bool TryCompareStandardDate (in Interop.Kernel32.TIME_ZONE_INFORMATION timeZone, in Interop.Kernel32.REG_TZI_FORMAT registryTimeZoneInfo)
 
static bool TryCompareTimeZoneInformationToRegistry (in Interop.Kernel32.TIME_ZONE_INFORMATION timeZone, string id, out bool dstDisabled)
 
static string GetLocalizedNameByMuiNativeResource (string resource)
 
static unsafe string GetLocalizedNameByNativeResource (string filePath, int resource)
 
static void GetLocalizedNamesByRegistryKey (RegistryKey key, out string displayName, out string standardName, out string daylightName)
 
static TimeZoneInfoResult TryGetTimeZoneFromLocalMachine (string id, out TimeZoneInfo value, out Exception e)
 
static string GetUtcStandardDisplayName ()
 
static string GetUtcFullDisplayName (string timeZoneId, string standardDisplayName)
 

Private Attributes

readonly string _id
 
readonly string _displayName
 
readonly string _standardDisplayName
 
readonly string _daylightDisplayName
 
readonly TimeSpan _baseUtcOffset
 
readonly bool _supportsDaylightSavingTime
 
readonly AdjustmentRule[] _adjustmentRules
 
List< TimeZoneInfo_equivalentZones
 

Static Private Attributes

static readonly TimeZoneInfo s_utcTimeZone = CreateUtcTimeZone()
 
static CachedData s_cachedData = new CachedData()
 
static readonly DateTime s_maxDateOnly = new DateTime(9999, 12, 31)
 
static readonly DateTime s_minDateOnly = new DateTime(1, 1, 2)
 
static readonly TimeSpan MaxOffset = TimeSpan.FromHours(14.0)
 
static readonly TimeSpan MinOffset = -MaxOffset
 

Detailed Description

Definition at line 16 of file TimeZoneInfo.cs.


The documentation for this class was generated from the following file: