using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
namespace System
{
/// Represents any time zone in the world.
// Token: 0x02000056 RID: 86
[Serializable]
public sealed class TimeZoneInfo : ISerializable, IDeserializationCallback, IEquatable
{
// Token: 0x0600049D RID: 1181 RVA: 0x00016F88 File Offset: 0x00015188
private TimeZoneInfo(string id, TimeSpan baseUtcOffset, string displayName, string standardDisplayName, string daylightDisplayName, TimeZoneInfo.AdjustmentRule[] adjustmentRules, bool disableDaylightSavingTime)
{
if (id == null)
{
throw new ArgumentNullException("id");
}
if (id == string.Empty)
{
throw new ArgumentException("id parameter is an empty string");
}
if (baseUtcOffset.Ticks % 600000000L != 0L)
{
throw new ArgumentException("baseUtcOffset parameter does not represent a whole number of minutes");
}
if (baseUtcOffset > new TimeSpan(14, 0, 0) || baseUtcOffset < new TimeSpan(-14, 0, 0))
{
throw new ArgumentOutOfRangeException("baseUtcOffset parameter is greater than 14 hours or less than -14 hours");
}
if (adjustmentRules != null && adjustmentRules.Length != 0)
{
TimeZoneInfo.AdjustmentRule adjustmentRule = null;
foreach (TimeZoneInfo.AdjustmentRule adjustmentRule2 in adjustmentRules)
{
if (adjustmentRule2 == null)
{
throw new InvalidTimeZoneException("one or more elements in adjustmentRules are null");
}
if (baseUtcOffset + adjustmentRule2.DaylightDelta < new TimeSpan(-14, 0, 0) || baseUtcOffset + adjustmentRule2.DaylightDelta > new TimeSpan(14, 0, 0))
{
throw new InvalidTimeZoneException("Sum of baseUtcOffset and DaylightDelta of one or more object in adjustmentRules array is greater than 14 or less than -14 hours;");
}
if (adjustmentRule != null && adjustmentRule.DateStart > adjustmentRule2.DateStart)
{
throw new InvalidTimeZoneException("adjustment rules specified in adjustmentRules parameter are not in chronological order");
}
if (adjustmentRule != null && adjustmentRule.DateEnd > adjustmentRule2.DateStart)
{
throw new InvalidTimeZoneException("some adjustment rules in the adjustmentRules parameter overlap");
}
if (adjustmentRule != null && adjustmentRule.DateEnd == adjustmentRule2.DateStart)
{
throw new InvalidTimeZoneException("a date can have multiple adjustment rules applied to it");
}
adjustmentRule = adjustmentRule2;
}
}
this.id = id;
this.baseUtcOffset = baseUtcOffset;
this.displayName = displayName ?? id;
this.standardDisplayName = standardDisplayName ?? id;
this.daylightDisplayName = daylightDisplayName;
this.disableDaylightSavingTime = disableDaylightSavingTime;
this.adjustmentRules = adjustmentRules;
}
/// Gets the time difference between the current time zone's standard time and Coordinated Universal Time (UTC).
/// A object that indicates the time difference between the current time zone's standard time and Coordinated Universal Time (UTC).
// Token: 0x17000057 RID: 87
// (get) Token: 0x0600049F RID: 1183 RVA: 0x00017160 File Offset: 0x00015360
public TimeSpan BaseUtcOffset
{
get
{
return this.baseUtcOffset;
}
}
/// Gets the localized display name for the current time zone's daylight saving time.
/// The display name for the time zone's localized daylight saving time.
// Token: 0x17000058 RID: 88
// (get) Token: 0x060004A0 RID: 1184 RVA: 0x00017168 File Offset: 0x00015368
public string DaylightName
{
get
{
if (this.disableDaylightSavingTime)
{
return string.Empty;
}
return this.daylightDisplayName;
}
}
/// Gets the localized general display name that represents the time zone.
/// The time zone's localized general display name.
// Token: 0x17000059 RID: 89
// (get) Token: 0x060004A1 RID: 1185 RVA: 0x00017184 File Offset: 0x00015384
public string DisplayName
{
get
{
return this.displayName;
}
}
/// Gets the time zone identifier.
/// The time zone identifier.
// Token: 0x1700005A RID: 90
// (get) Token: 0x060004A2 RID: 1186 RVA: 0x0001718C File Offset: 0x0001538C
public string Id
{
get
{
return this.id;
}
}
/// Gets a object that represents the local time zone.
/// A object that represents the local time zone.
// Token: 0x1700005B RID: 91
// (get) Token: 0x060004A3 RID: 1187 RVA: 0x00017194 File Offset: 0x00015394
public static TimeZoneInfo Local
{
get
{
if (TimeZoneInfo.local == null)
{
try
{
TimeZoneInfo.local = TimeZoneInfo.FindSystemTimeZoneByFileName("Local", "/etc/localtime");
}
catch
{
try
{
TimeZoneInfo.local = TimeZoneInfo.FindSystemTimeZoneByFileName("Local", Path.Combine(TimeZoneInfo.TimeZoneDirectory, "localtime"));
}
catch
{
throw new TimeZoneNotFoundException();
}
}
}
return TimeZoneInfo.local;
}
}
/// Gets the localized display name for the time zone's standard time.
/// The localized display name of the time zone's standard time.
// Token: 0x1700005C RID: 92
// (get) Token: 0x060004A4 RID: 1188 RVA: 0x00017234 File Offset: 0x00015434
public string StandardName
{
get
{
return this.standardDisplayName;
}
}
/// Gets a value indicating whether the time zone has any daylight saving time rules.
/// true if the time zone supports daylight saving time; otherwise, false.
// Token: 0x1700005D RID: 93
// (get) Token: 0x060004A5 RID: 1189 RVA: 0x0001723C File Offset: 0x0001543C
public bool SupportsDaylightSavingTime
{
get
{
return !this.disableDaylightSavingTime;
}
}
/// Gets a object that represents the Coordinated Universal Time (UTC) zone.
/// A object that represents the Coordinated Universal Time (UTC) zone.
// Token: 0x1700005E RID: 94
// (get) Token: 0x060004A6 RID: 1190 RVA: 0x00017248 File Offset: 0x00015448
public static TimeZoneInfo Utc
{
get
{
if (TimeZoneInfo.utc == null)
{
TimeZoneInfo.utc = TimeZoneInfo.CreateCustomTimeZone("UTC", new TimeSpan(0L), "UTC", "UTC");
}
return TimeZoneInfo.utc;
}
}
// Token: 0x1700005F RID: 95
// (get) Token: 0x060004A7 RID: 1191 RVA: 0x0001727C File Offset: 0x0001547C
// (set) Token: 0x060004A8 RID: 1192 RVA: 0x00017298 File Offset: 0x00015498
private static string TimeZoneDirectory
{
get
{
if (TimeZoneInfo.timeZoneDirectory == null)
{
TimeZoneInfo.timeZoneDirectory = "/usr/share/zoneinfo";
}
return TimeZoneInfo.timeZoneDirectory;
}
set
{
TimeZoneInfo.ClearCachedData();
TimeZoneInfo.timeZoneDirectory = value;
}
}
/// Clears cached time zone data.
/// 2
// Token: 0x060004A9 RID: 1193 RVA: 0x000172A8 File Offset: 0x000154A8
public static void ClearCachedData()
{
TimeZoneInfo.local = null;
TimeZoneInfo.utc = null;
TimeZoneInfo.systemTimeZones = null;
}
/// Converts a time to the time in a particular time zone.
/// A value that represents the date and time in the destination time zone.
/// The date and time to convert.
/// The time zone to convert to.
/// The value of the parameter represents an invalid time.
/// The value of the parameter is null.
// Token: 0x060004AA RID: 1194 RVA: 0x000172BC File Offset: 0x000154BC
public static DateTime ConvertTime(DateTime dateTime, TimeZoneInfo destinationTimeZone)
{
return TimeZoneInfo.ConvertTime(dateTime, TimeZoneInfo.Local, destinationTimeZone);
}
/// Converts a time from one time zone to another.
/// A value that represents the date and time in the destination time zone that corresponds to the parameter in the source time zone.
/// The date and time to convert.
/// The time zone of .
/// The time zone to convert to.
/// The property of the parameter is , but the parameter does not equal .-or-The property of the parameter is , but the parameter does not equal .-or-The parameter is an invalid time (that is, it represents a time that does not exist because of a time zone's adjustment rules).
/// The parameter is null.-or-The parameter is null.
// Token: 0x060004AB RID: 1195 RVA: 0x000172CC File Offset: 0x000154CC
public static DateTime ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone)
{
if (dateTime.Kind == DateTimeKind.Local && sourceTimeZone != TimeZoneInfo.Local)
{
throw new ArgumentException("Kind propery of dateTime is Local but the sourceTimeZone does not equal TimeZoneInfo.Local");
}
if (dateTime.Kind == DateTimeKind.Utc && sourceTimeZone != TimeZoneInfo.Utc)
{
throw new ArgumentException("Kind propery of dateTime is Utc but the sourceTimeZone does not equal TimeZoneInfo.Utc");
}
if (sourceTimeZone.IsInvalidTime(dateTime))
{
throw new ArgumentException("dateTime parameter is an invalid time");
}
if (sourceTimeZone == null)
{
throw new ArgumentNullException("sourceTimeZone");
}
if (destinationTimeZone == null)
{
throw new ArgumentNullException("destinationTimeZone");
}
if (dateTime.Kind == DateTimeKind.Local && sourceTimeZone == TimeZoneInfo.Local && destinationTimeZone == TimeZoneInfo.Local)
{
return dateTime;
}
DateTime dateTime2 = TimeZoneInfo.ConvertTimeToUtc(dateTime);
if (destinationTimeZone == TimeZoneInfo.Utc)
{
return dateTime2;
}
return TimeZoneInfo.ConvertTimeFromUtc(dateTime2, destinationTimeZone);
}
/// Converts a time to the time in a particular time zone.
/// A value that represents the date and time in the destination time zone.
/// The date and time to convert.
/// The time zone to convert to.
/// The value of the parameter is null.
// Token: 0x060004AC RID: 1196 RVA: 0x00017398 File Offset: 0x00015598
public static DateTimeOffset ConvertTime(DateTimeOffset dateTimeOffset, TimeZoneInfo destinationTimeZone)
{
throw new NotImplementedException();
}
/// Converts a time to the time in another time zone based on the time zone's identifier.
/// A value that represents the date and time in the destination time zone.
/// The date and time to convert.
/// The identifier of the destination time zone.
///
/// is null.
/// The time zone identifier was found, but the registry data is corrupted.
/// The process does not have the permissions required to read from the registry key that contains the time zone information.
/// The identifier was not found on the local system.
// Token: 0x060004AD RID: 1197 RVA: 0x000173A0 File Offset: 0x000155A0
public static DateTime ConvertTimeBySystemTimeZoneId(DateTime dateTime, string destinationTimeZoneId)
{
return TimeZoneInfo.ConvertTime(dateTime, TimeZoneInfo.FindSystemTimeZoneById(destinationTimeZoneId));
}
/// Converts a time from one time zone to another based on time zone identifiers.
/// A value that represents the date and time in the destination time zone that corresponds to the parameter in the source time zone.
/// The date and time to convert.
/// The identifier of the source time zone.
/// The identifier of the destination time zone.
/// The property of the parameter does not correspond to the source time zone.-or- is an invalid time in the source time zone.
///
/// is null.-or- is null.
/// The time zone identifier was found, but the registry data is corrupted.
/// The process does not have the permissions required to read from the registry key that contains the time zone information.
/// The identifier was not found on the local system.-or-The identifier was not found on the local system.
/// The user does not have the permissions required to read from the registry keys that hold time zone data.
// Token: 0x060004AE RID: 1198 RVA: 0x000173B0 File Offset: 0x000155B0
public static DateTime ConvertTimeBySystemTimeZoneId(DateTime dateTime, string sourceTimeZoneId, string destinationTimeZoneId)
{
return TimeZoneInfo.ConvertTime(dateTime, TimeZoneInfo.FindSystemTimeZoneById(sourceTimeZoneId), TimeZoneInfo.FindSystemTimeZoneById(destinationTimeZoneId));
}
/// Converts a time to the time in another time zone based on the time zone's identifier.
/// A value that represents the date and time in the destination time zone.
/// The date and time to convert.
/// The identifier of the destination time zone.
///
/// is null.
/// The time zone identifier was found but the registry data is corrupted.
/// The process does not have the permissions required to read from the registry key that contains the time zone information.
/// The identifier was not found on the local system.
// Token: 0x060004AF RID: 1199 RVA: 0x000173C4 File Offset: 0x000155C4
public static DateTimeOffset ConvertTimeBySystemTimeZoneId(DateTimeOffset dateTimeOffset, string destinationTimeZoneId)
{
return TimeZoneInfo.ConvertTime(dateTimeOffset, TimeZoneInfo.FindSystemTimeZoneById(destinationTimeZoneId));
}
// Token: 0x060004B0 RID: 1200 RVA: 0x000173D4 File Offset: 0x000155D4
private DateTime ConvertTimeFromUtc(DateTime dateTime)
{
if (dateTime.Kind == DateTimeKind.Local)
{
throw new ArgumentException("Kind property of dateTime is Local");
}
if (this == TimeZoneInfo.Utc)
{
return DateTime.SpecifyKind(dateTime, DateTimeKind.Utc);
}
if (this == TimeZoneInfo.Local)
{
return DateTime.SpecifyKind(dateTime.ToLocalTime(), DateTimeKind.Unspecified);
}
TimeZoneInfo.AdjustmentRule applicableRule = this.GetApplicableRule(dateTime);
if (this.IsDaylightSavingTime(DateTime.SpecifyKind(dateTime, DateTimeKind.Utc)))
{
return DateTime.SpecifyKind(dateTime + this.BaseUtcOffset + applicableRule.DaylightDelta, DateTimeKind.Unspecified);
}
return DateTime.SpecifyKind(dateTime + this.BaseUtcOffset, DateTimeKind.Unspecified);
}
/// Converts a Coordinated Universal Time (UTC) to the time in a specified time zone.
/// A value that represents the date and time in the destination time zone. Its property is if is ; otherwise, its property is .
/// The Coordinated Universal Time (UTC).
/// The time zone to convert to.
/// The property of is .
///
/// is null.
// Token: 0x060004B1 RID: 1201 RVA: 0x00017470 File Offset: 0x00015670
public static DateTime ConvertTimeFromUtc(DateTime dateTime, TimeZoneInfo destinationTimeZone)
{
if (destinationTimeZone == null)
{
throw new ArgumentNullException("destinationTimeZone");
}
return destinationTimeZone.ConvertTimeFromUtc(dateTime);
}
/// Converts the current date and time to Coordinated Universal Time (UTC).
/// A value that represents the Coordinated Universal Time (UTC) that corresponds to the parameter. The value's property is always set to .
/// The date and time to convert.
/// TimeZoneInfo.Local.IsInvalidDateTime() returns true.
// Token: 0x060004B2 RID: 1202 RVA: 0x0001748C File Offset: 0x0001568C
public static DateTime ConvertTimeToUtc(DateTime dateTime)
{
if (dateTime.Kind == DateTimeKind.Utc)
{
return dateTime;
}
return DateTime.SpecifyKind(dateTime.ToUniversalTime(), DateTimeKind.Utc);
}
/// Converts the time in a specified time zone to Coordinated Universal Time (UTC).
/// A object that represents the Coordinated Universal Time (UTC) that corresponds to the parameter. The object's property is always set to .
/// The date and time to convert.
/// The time zone of .
///
/// .Kind is and does not equal .-or-.Kind is and does not equal .-or-.IsInvalidDateTime() returns true.
///
/// is null.
// Token: 0x060004B3 RID: 1203 RVA: 0x000174AC File Offset: 0x000156AC
public static DateTime ConvertTimeToUtc(DateTime dateTime, TimeZoneInfo sourceTimeZone)
{
if (sourceTimeZone == null)
{
throw new ArgumentNullException("sourceTimeZone");
}
if (dateTime.Kind == DateTimeKind.Utc && sourceTimeZone != TimeZoneInfo.Utc)
{
throw new ArgumentException("Kind propery of dateTime is Utc but the sourceTimeZone does not equal TimeZoneInfo.Utc");
}
if (dateTime.Kind == DateTimeKind.Local && sourceTimeZone != TimeZoneInfo.Local)
{
throw new ArgumentException("Kind propery of dateTime is Local but the sourceTimeZone does not equal TimeZoneInfo.Local");
}
if (sourceTimeZone.IsInvalidTime(dateTime))
{
throw new ArgumentException("dateTime parameter is an invalid time");
}
if (dateTime.Kind == DateTimeKind.Utc && sourceTimeZone == TimeZoneInfo.Utc)
{
return dateTime;
}
if (dateTime.Kind == DateTimeKind.Utc)
{
return dateTime;
}
if (dateTime.Kind == DateTimeKind.Local)
{
return TimeZoneInfo.ConvertTimeToUtc(dateTime);
}
if (sourceTimeZone.IsAmbiguousTime(dateTime) || !sourceTimeZone.IsDaylightSavingTime(dateTime))
{
return DateTime.SpecifyKind(dateTime - sourceTimeZone.BaseUtcOffset, DateTimeKind.Utc);
}
TimeZoneInfo.AdjustmentRule applicableRule = sourceTimeZone.GetApplicableRule(dateTime);
return DateTime.SpecifyKind(dateTime - sourceTimeZone.BaseUtcOffset - applicableRule.DaylightDelta, DateTimeKind.Utc);
}
/// Creates a custom time zone with a specified identifier, an offset from Coordinated Universal Time (UTC), a display name, and a standard time display name.
/// A object that represents the new time zone.
/// The time zone's identifier.
/// A object that represents the time difference between this time zone and Coordinated Universal Time (UTC).
/// The display name of the new time zone.
/// The name of the new time zone's standard time.
/// The parameter is null.
/// The parameter is an empty string ("").-or-The parameter does not represent a whole number of minutes.
/// The parameter is greater than 14 hours or less than -14 hours.
/// 2
// Token: 0x060004B4 RID: 1204 RVA: 0x000175B4 File Offset: 0x000157B4
public static TimeZoneInfo CreateCustomTimeZone(string id, TimeSpan baseUtcOffset, string displayName, string standardDisplayName)
{
return TimeZoneInfo.CreateCustomTimeZone(id, baseUtcOffset, displayName, standardDisplayName, null, null, true);
}
/// Creates a custom time zone with a specified identifier, an offset from Coordinated Universal Time (UTC), a display name, a standard time name, a daylight saving time name, and daylight saving time rules.
/// A object that represents the new time zone.
/// The time zone's identifier.
/// A object that represents the time difference between this time zone and Coordinated Universal Time (UTC).
/// The display name of the new time zone.
/// The new time zone's standard time name.
/// The daylight saving time name of the new time zone.
/// An array of objects that augment the base UTC offset for a particular period.
/// The parameter is null.
/// The parameter is an empty string ("").-or-The parameter does not represent a whole number of minutes.
/// The parameter is greater than 14 hours or less than -14 hours.
/// The adjustment rules specified in the parameter overlap.-or-The adjustment rules specified in the parameter are not in chronological order.-or-One or more elements in are null.-or-A date can have multiple adjustment rules applied to it.-or-The sum of the parameter and the value of one or more objects in the array is greater than 14 hours or less than -14 hours.
/// 2
// Token: 0x060004B5 RID: 1205 RVA: 0x000175C4 File Offset: 0x000157C4
public static TimeZoneInfo CreateCustomTimeZone(string id, TimeSpan baseUtcOffset, string displayName, string standardDisplayName, string daylightDisplayName, TimeZoneInfo.AdjustmentRule[] adjustmentRules)
{
return TimeZoneInfo.CreateCustomTimeZone(id, baseUtcOffset, displayName, standardDisplayName, daylightDisplayName, adjustmentRules, false);
}
/// Creates a custom time zone with a specified identifier, an offset from Coordinated Universal Time (UTC), a display name, a standard time name, a daylight saving time name, daylight saving time rules, and a value that indicates whether the returned object reflects daylight saving time information.
/// A object that represents the new time zone. If the parameter is true, the returned object has no daylight saving time data.
/// The time zone's identifier.
/// A object that represents the time difference between this time zone and Coordinated Universal Time (UTC).
/// The display name of the new time zone.
/// The standard time name of the new time zone.
/// The daylight saving time name of the new time zone.
/// An array of objects that augment the base UTC offset for a particular period.
/// true to discard any daylight saving time-related information present in with the new object; otherwise, false.
/// The parameter is null.
/// The parameter is an empty string ("").-or-The parameter does not represent a whole number of minutes.
/// The parameter is greater than 14 hours or less than -14 hours.
/// The adjustment rules specified in the parameter overlap.-or-The adjustment rules specified in the parameter are not in chronological order.-or-One or more elements in are null.-or-A date can have multiple adjustment rules applied to it.-or-The sum of the parameter and the value of one or more objects in the array is greater than 14 hours or less than -14 hours.
/// 2
// Token: 0x060004B6 RID: 1206 RVA: 0x000175D4 File Offset: 0x000157D4
public static TimeZoneInfo CreateCustomTimeZone(string id, TimeSpan baseUtcOffset, string displayName, string standardDisplayName, string daylightDisplayName, TimeZoneInfo.AdjustmentRule[] adjustmentRules, bool disableDaylightSavingTime)
{
return new TimeZoneInfo(id, baseUtcOffset, displayName, standardDisplayName, daylightDisplayName, adjustmentRules, disableDaylightSavingTime);
}
/// Determines whether the current object and another object are equal.
/// true if the two objects are equal; otherwise, false.
/// A second object to compare with the current object.
/// 2
// Token: 0x060004B7 RID: 1207 RVA: 0x000175E8 File Offset: 0x000157E8
public bool Equals(TimeZoneInfo other)
{
return other != null && other.Id == this.Id && this.HasSameRules(other);
}
/// Retrieves a object from the registry based on its identifier.
/// A object whose identifier is the value of the parameter.
/// The time zone identifier, which corresponds to the property.
/// The system does not have enough memory to hold information about the time zone.
/// The parameter is null.
/// The time zone identifier specified by was not found. This means that a registry key whose name matches does not exist, or that the key exists but does not contain any time zone data.
/// The process does not have the permissions required to read from the registry key that contains the time zone information.
/// The time zone identifier was found, but the registry data is corrupted.
// Token: 0x060004B8 RID: 1208 RVA: 0x00017620 File Offset: 0x00015820
public static TimeZoneInfo FindSystemTimeZoneById(string id)
{
if (id == null)
{
throw new ArgumentNullException("id");
}
string text = Path.Combine(TimeZoneInfo.TimeZoneDirectory, id);
return TimeZoneInfo.FindSystemTimeZoneByFileName(id, text);
}
// Token: 0x060004B9 RID: 1209 RVA: 0x00017654 File Offset: 0x00015854
private static TimeZoneInfo FindSystemTimeZoneByFileName(string id, string filepath)
{
if (!File.Exists(filepath))
{
throw new TimeZoneNotFoundException();
}
byte[] array = new byte[16384];
int num;
using (FileStream fileStream = File.OpenRead(filepath))
{
num = fileStream.Read(array, 0, 16384);
}
if (!TimeZoneInfo.ValidTZFile(array, num))
{
throw new InvalidTimeZoneException("TZ file too big for the buffer");
}
TimeZoneInfo timeZoneInfo;
try
{
timeZoneInfo = TimeZoneInfo.ParseTZBuffer(id, array, num);
}
catch (Exception ex)
{
throw new InvalidTimeZoneException(ex.Message);
}
return timeZoneInfo;
}
/// Deserializes a string to re-create an original serialized object.
/// A object.
/// The string representation of the serialized object.
/// The parameter is .
/// The parameter is a null string.
/// The source parameter cannot be deserialized back into a object.
// Token: 0x060004BA RID: 1210 RVA: 0x00017718 File Offset: 0x00015918
public static TimeZoneInfo FromSerializedString(string source)
{
throw new NotImplementedException();
}
/// Retrieves an array of objects that apply to the current object.
/// An array of objects for this time zone.
/// The system does not have enough memory to make an in-memory copy of the adjustment rules.
/// 2
// Token: 0x060004BB RID: 1211 RVA: 0x00017720 File Offset: 0x00015920
public TimeZoneInfo.AdjustmentRule[] GetAdjustmentRules()
{
if (this.disableDaylightSavingTime)
{
return new TimeZoneInfo.AdjustmentRule[0];
}
return (TimeZoneInfo.AdjustmentRule[])this.adjustmentRules.Clone();
}
/// Returns information about the possible dates and times that an ambiguous date and time can be mapped to.
/// An array of objects that represents possible Coordinated Universal Time (UTC) offsets that a particular date and time can be mapped to.
/// A date and time.
///
/// is not an ambiguous time.
/// 2
// Token: 0x060004BC RID: 1212 RVA: 0x00017750 File Offset: 0x00015950
public TimeSpan[] GetAmbiguousTimeOffsets(DateTime dateTime)
{
if (!this.IsAmbiguousTime(dateTime))
{
throw new ArgumentException("dateTime is not an ambiguous time");
}
TimeZoneInfo.AdjustmentRule applicableRule = this.GetApplicableRule(dateTime);
return new TimeSpan[]
{
this.baseUtcOffset,
this.baseUtcOffset + applicableRule.DaylightDelta
};
}
/// Returns information about the possible dates and times that an ambiguous date and time can be mapped to.
/// An array of objects that represents possible Coordinated Universal Time (UTC) offsets that a particular date and time can be mapped to.
/// A date and time.
///
/// is not an ambiguous time.
/// 2
// Token: 0x060004BD RID: 1213 RVA: 0x000177B4 File Offset: 0x000159B4
public TimeSpan[] GetAmbiguousTimeOffsets(DateTimeOffset dateTimeOffset)
{
if (!this.IsAmbiguousTime(dateTimeOffset))
{
throw new ArgumentException("dateTimeOffset is not an ambiguous time");
}
throw new NotImplementedException();
}
/// Serves as a hash function for hashing algorithms and data structures such as hash tables.
/// A 32-bit signed integer that serves as the hash code for this object.
/// 2
// Token: 0x060004BE RID: 1214 RVA: 0x000177D4 File Offset: 0x000159D4
public override int GetHashCode()
{
int num = this.Id.GetHashCode();
foreach (TimeZoneInfo.AdjustmentRule adjustmentRule in this.GetAdjustmentRules())
{
num ^= adjustmentRule.GetHashCode();
}
return num;
}
// Token: 0x060004BF RID: 1215 RVA: 0x00017818 File Offset: 0x00015A18
public void GetObjectData(SerializationInfo info, StreamingContext context)
{
throw new NotImplementedException();
}
/// Returns a sorted collection of all the time zones about which information is available on the local system.
/// A read-only collection of objects.
/// There is insufficient memory to store all time zone information.
/// The user does not have permission to read from the registry keys that contain time zone information.
// Token: 0x060004C0 RID: 1216 RVA: 0x00017820 File Offset: 0x00015A20
public static ReadOnlyCollection GetSystemTimeZones()
{
if (TimeZoneInfo.systemTimeZones == null)
{
TimeZoneInfo.systemTimeZones = new List();
string[] array = new string[]
{
"Africa", "America", "Antarctica", "Arctic", "Asia", "Atlantic", "Brazil", "Canada", "Chile", "Europe",
"Indian", "Mexico", "Mideast", "Pacific", "US"
};
foreach (string text in array)
{
try
{
foreach (string text2 in Directory.GetFiles(Path.Combine(TimeZoneInfo.TimeZoneDirectory, text)))
{
try
{
string text3 = string.Format("{0}/{1}", text, Path.GetFileName(text2));
TimeZoneInfo.systemTimeZones.Add(TimeZoneInfo.FindSystemTimeZoneById(text3));
}
catch (ArgumentNullException)
{
}
catch (TimeZoneNotFoundException)
{
}
catch (InvalidTimeZoneException)
{
}
catch (Exception)
{
throw;
}
}
}
catch
{
}
}
}
return new ReadOnlyCollection(TimeZoneInfo.systemTimeZones);
}
/// Calculates the offset or difference between the time in this time zone and Coordinated Universal Time (UTC) for a particular date and time.
/// A object that indicates the time difference between the two time zones.
/// The date and time to determine the offset for.
// Token: 0x060004C1 RID: 1217 RVA: 0x000179E8 File Offset: 0x00015BE8
public TimeSpan GetUtcOffset(DateTime dateTime)
{
if (this.IsDaylightSavingTime(dateTime))
{
TimeZoneInfo.AdjustmentRule applicableRule = this.GetApplicableRule(dateTime);
return this.BaseUtcOffset + applicableRule.DaylightDelta;
}
return this.BaseUtcOffset;
}
/// Calculates the offset or difference between the time in this time zone and Coordinated Universal Time (UTC) for a particular date and time.
/// A object that indicates the time difference between Coordinated Universal Time (UTC) and the current time zone.
/// The date and time to determine the offset for.
// Token: 0x060004C2 RID: 1218 RVA: 0x00017A24 File Offset: 0x00015C24
public TimeSpan GetUtcOffset(DateTimeOffset dateTimeOffset)
{
throw new NotImplementedException();
}
/// Indicates whether the current object and another object have the same adjustment rules.
/// true if the two time zones have identical adjustment rules and an identical base offset; otherwise, false.
/// A second object to compare with the current object.
/// The parameter is null.
// Token: 0x060004C3 RID: 1219 RVA: 0x00017A2C File Offset: 0x00015C2C
public bool HasSameRules(TimeZoneInfo other)
{
if (other == null)
{
throw new ArgumentNullException("other");
}
if (this.adjustmentRules == null != (other.adjustmentRules == null))
{
return false;
}
if (this.adjustmentRules == null)
{
return true;
}
if (this.BaseUtcOffset != other.BaseUtcOffset)
{
return false;
}
if (this.adjustmentRules.Length != other.adjustmentRules.Length)
{
return false;
}
for (int i = 0; i < this.adjustmentRules.Length; i++)
{
if (!this.adjustmentRules[i].Equals(other.adjustmentRules[i]))
{
return false;
}
}
return true;
}
/// Determines whether a particular date and time in a particular time zone is ambiguous and can be mapped to two or more Coordinated Universal Time (UTC) times.
/// true if the parameter is ambiguous; otherwise, false.
/// A date and time value.
/// The property of the value is and is an invalid time.
/// 2
// Token: 0x060004C4 RID: 1220 RVA: 0x00017AD8 File Offset: 0x00015CD8
public bool IsAmbiguousTime(DateTime dateTime)
{
if (dateTime.Kind == DateTimeKind.Local && this.IsInvalidTime(dateTime))
{
throw new ArgumentException("Kind is Local and time is Invalid");
}
if (this == TimeZoneInfo.Utc)
{
return false;
}
if (dateTime.Kind == DateTimeKind.Utc)
{
dateTime = this.ConvertTimeFromUtc(dateTime);
}
if (dateTime.Kind == DateTimeKind.Local && this != TimeZoneInfo.Local)
{
dateTime = TimeZoneInfo.ConvertTime(dateTime, TimeZoneInfo.Local, this);
}
TimeZoneInfo.AdjustmentRule applicableRule = this.GetApplicableRule(dateTime);
DateTime dateTime2 = TimeZoneInfo.TransitionPoint(applicableRule.DaylightTransitionEnd, dateTime.Year);
return dateTime > dateTime2 - applicableRule.DaylightDelta && dateTime <= dateTime2;
}
/// Determines whether a particular date and time in a particular time zone is ambiguous and can be mapped to two or more Coordinated Universal Time (UTC) times.
/// true if the parameter is ambiguous in the current time zone; otherwise, false.
/// A date and time.
/// 2
// Token: 0x060004C5 RID: 1221 RVA: 0x00017B94 File Offset: 0x00015D94
public bool IsAmbiguousTime(DateTimeOffset dateTimeOffset)
{
throw new NotImplementedException();
}
/// Indicates whether a specified date and time falls in the range of daylight saving time for the time zone of the current object.
/// true if the parameter is a daylight saving time; otherwise, false.
/// A date and time value.
/// The property of the value is and is an invalid time.
// Token: 0x060004C6 RID: 1222 RVA: 0x00017B9C File Offset: 0x00015D9C
public bool IsDaylightSavingTime(DateTime dateTime)
{
if (dateTime.Kind == DateTimeKind.Local && this.IsInvalidTime(dateTime))
{
throw new ArgumentException("dateTime is invalid and Kind is Local");
}
if (this == TimeZoneInfo.Utc)
{
return false;
}
if (!this.SupportsDaylightSavingTime)
{
return false;
}
if ((dateTime.Kind == DateTimeKind.Local || dateTime.Kind == DateTimeKind.Unspecified) && this == TimeZoneInfo.Local)
{
return dateTime.IsDaylightSavingTime();
}
if (dateTime.Kind == DateTimeKind.Local && this != TimeZoneInfo.Utc)
{
return this.IsDaylightSavingTime(DateTime.SpecifyKind(dateTime.ToUniversalTime(), DateTimeKind.Utc));
}
TimeZoneInfo.AdjustmentRule applicableRule = this.GetApplicableRule(dateTime.Date);
if (applicableRule == null)
{
return false;
}
DateTime dateTime2 = TimeZoneInfo.TransitionPoint(applicableRule.DaylightTransitionStart, dateTime.Year);
DateTime dateTime3 = TimeZoneInfo.TransitionPoint(applicableRule.DaylightTransitionEnd, dateTime.Year + ((applicableRule.DaylightTransitionStart.Month >= applicableRule.DaylightTransitionEnd.Month) ? 1 : 0));
if (dateTime.Kind == DateTimeKind.Utc)
{
dateTime2 -= this.BaseUtcOffset;
dateTime3 -= this.BaseUtcOffset + applicableRule.DaylightDelta;
}
return dateTime >= dateTime2 && dateTime < dateTime3;
}
/// Indicates whether a specified date and time falls in the range of daylight saving time for the time zone of the current object.
/// true if the parameter is a daylight saving time; otherwise, false.
/// A date and time value.
// Token: 0x060004C7 RID: 1223 RVA: 0x00017CF0 File Offset: 0x00015EF0
public bool IsDaylightSavingTime(DateTimeOffset dateTimeOffset)
{
throw new NotImplementedException();
}
/// Indicates whether a particular date and time is invalid.
/// true if is invalid; otherwise, false.
/// A date and time value.
/// 2
// Token: 0x060004C8 RID: 1224 RVA: 0x00017CF8 File Offset: 0x00015EF8
public bool IsInvalidTime(DateTime dateTime)
{
if (dateTime.Kind == DateTimeKind.Utc)
{
return false;
}
if (dateTime.Kind == DateTimeKind.Local && this != TimeZoneInfo.Local)
{
return false;
}
TimeZoneInfo.AdjustmentRule applicableRule = this.GetApplicableRule(dateTime);
DateTime dateTime2 = TimeZoneInfo.TransitionPoint(applicableRule.DaylightTransitionStart, dateTime.Year);
return dateTime >= dateTime2 && dateTime < dateTime2 + applicableRule.DaylightDelta;
}
// Token: 0x060004C9 RID: 1225 RVA: 0x00017D70 File Offset: 0x00015F70
public void OnDeserialization(object sender)
{
throw new NotImplementedException();
}
/// Converts the current object to a serialized string.
/// A string that represents the current object.
// Token: 0x060004CA RID: 1226 RVA: 0x00017D78 File Offset: 0x00015F78
public string ToSerializedString()
{
throw new NotImplementedException();
}
/// Returns the current object's display name.
/// The value of the property of the current object.
// Token: 0x060004CB RID: 1227 RVA: 0x00017D80 File Offset: 0x00015F80
public override string ToString()
{
return this.DisplayName;
}
// Token: 0x060004CC RID: 1228 RVA: 0x00017D88 File Offset: 0x00015F88
private TimeZoneInfo.AdjustmentRule GetApplicableRule(DateTime dateTime)
{
DateTime dateTime2 = dateTime;
if (dateTime.Kind == DateTimeKind.Local && this != TimeZoneInfo.Local)
{
dateTime2 = dateTime2.ToUniversalTime() + this.BaseUtcOffset;
}
if (dateTime.Kind == DateTimeKind.Utc && this != TimeZoneInfo.Utc)
{
dateTime2 += this.BaseUtcOffset;
}
foreach (TimeZoneInfo.AdjustmentRule adjustmentRule in this.adjustmentRules)
{
if (adjustmentRule.DateStart > dateTime2.Date)
{
return null;
}
if (!(adjustmentRule.DateEnd < dateTime2.Date))
{
return adjustmentRule;
}
}
return null;
}
// Token: 0x060004CD RID: 1229 RVA: 0x00017E40 File Offset: 0x00016040
private static DateTime TransitionPoint(TimeZoneInfo.TransitionTime transition, int year)
{
if (transition.IsFixedDateRule)
{
return new DateTime(year, transition.Month, transition.Day) + transition.TimeOfDay.TimeOfDay;
}
DateTime dateTime = new DateTime(year, transition.Month, 1);
DayOfWeek dayOfWeek = dateTime.DayOfWeek;
int num = 1 + (transition.Week - 1) * 7 + (transition.DayOfWeek - dayOfWeek) % 7;
if (num > DateTime.DaysInMonth(year, transition.Month))
{
num -= 7;
}
return new DateTime(year, transition.Month, num) + transition.TimeOfDay.TimeOfDay;
}
// Token: 0x060004CE RID: 1230 RVA: 0x00017EF0 File Offset: 0x000160F0
private static bool ValidTZFile(byte[] buffer, int length)
{
StringBuilder stringBuilder = new StringBuilder();
for (int i = 0; i < 4; i++)
{
stringBuilder.Append((char)buffer[i]);
}
return !(stringBuilder.ToString() != "TZif") && length < 16384;
}
// Token: 0x060004CF RID: 1231 RVA: 0x00017F48 File Offset: 0x00016148
private static int SwapInt32(int i)
{
return ((i >> 24) & 255) | ((i >> 8) & 65280) | ((i << 8) & 16711680) | (i << 24);
}
// Token: 0x060004D0 RID: 1232 RVA: 0x00017F70 File Offset: 0x00016170
private static int ReadBigEndianInt32(byte[] buffer, int start)
{
int num = BitConverter.ToInt32(buffer, start);
if (!BitConverter.IsLittleEndian)
{
return num;
}
return TimeZoneInfo.SwapInt32(num);
}
// Token: 0x060004D1 RID: 1233 RVA: 0x00017F98 File Offset: 0x00016198
private static TimeZoneInfo ParseTZBuffer(string id, byte[] buffer, int length)
{
int num = TimeZoneInfo.ReadBigEndianInt32(buffer, 20);
int num2 = TimeZoneInfo.ReadBigEndianInt32(buffer, 24);
int num3 = TimeZoneInfo.ReadBigEndianInt32(buffer, 28);
int num4 = TimeZoneInfo.ReadBigEndianInt32(buffer, 32);
int num5 = TimeZoneInfo.ReadBigEndianInt32(buffer, 36);
int num6 = TimeZoneInfo.ReadBigEndianInt32(buffer, 40);
if (length < 44 + num4 * 5 + num5 * 6 + num6 + num3 * 8 + num2 + num)
{
throw new InvalidTimeZoneException();
}
Dictionary dictionary = TimeZoneInfo.ParseAbbreviations(buffer, 44 + 4 * num4 + num4 + 6 * num5, num6);
Dictionary dictionary2 = TimeZoneInfo.ParseTimesTypes(buffer, 44 + 4 * num4 + num4, num5, dictionary);
List> list = TimeZoneInfo.ParseTransitions(buffer, 44, num4, dictionary2);
if (dictionary2.Count == 0)
{
throw new InvalidTimeZoneException();
}
if (dictionary2.Count == 1 && dictionary2[0].IsDst)
{
throw new InvalidTimeZoneException();
}
TimeSpan timeSpan = new TimeSpan(0L);
TimeSpan timeSpan2 = new TimeSpan(0L);
string text = null;
string text2 = null;
bool flag = false;
DateTime dateTime = DateTime.MinValue;
List list2 = new List();
for (int i = 0; i < list.Count; i++)
{
KeyValuePair keyValuePair = list[i];
DateTime key = keyValuePair.Key;
TimeZoneInfo.TimeType value = keyValuePair.Value;
if (!value.IsDst)
{
if (text != value.Name || timeSpan.TotalSeconds != (double)value.Offset)
{
text = value.Name;
text2 = null;
timeSpan = new TimeSpan(0, 0, value.Offset);
list2 = new List();
flag = false;
}
if (flag)
{
dateTime += timeSpan;
DateTime dateTime2 = key + timeSpan + timeSpan2;
if (dateTime2.Date == new DateTime(dateTime2.Year, 1, 1) && dateTime2.Year > dateTime.Year)
{
dateTime2 -= new TimeSpan(24, 0, 0);
}
DateTime dateTime3;
if (dateTime.Month < 7)
{
dateTime3 = new DateTime(dateTime.Year, 1, 1);
}
else
{
dateTime3 = new DateTime(dateTime.Year, 7, 1);
}
DateTime dateTime4;
if (dateTime2.Month >= 7)
{
dateTime4 = new DateTime(dateTime2.Year, 12, 31);
}
else
{
dateTime4 = new DateTime(dateTime2.Year, 6, 30);
}
TimeZoneInfo.TransitionTime transitionTime = TimeZoneInfo.TransitionTime.CreateFixedDateRule(new DateTime(1, 1, 1) + dateTime.TimeOfDay, dateTime.Month, dateTime.Day);
TimeZoneInfo.TransitionTime transitionTime2 = TimeZoneInfo.TransitionTime.CreateFixedDateRule(new DateTime(1, 1, 1) + dateTime2.TimeOfDay, dateTime2.Month, dateTime2.Day);
if (transitionTime != transitionTime2)
{
list2.Add(TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule(dateTime3, dateTime4, timeSpan2, transitionTime, transitionTime2));
}
}
flag = false;
}
else
{
if (text2 != value.Name || timeSpan2.TotalSeconds != (double)value.Offset - timeSpan.TotalSeconds)
{
text2 = value.Name;
timeSpan2 = new TimeSpan(0, 0, value.Offset) - timeSpan;
}
dateTime = key;
flag = true;
}
}
if (list2.Count == 0)
{
TimeZoneInfo.TimeType timeType = dictionary2[0];
if (text == null)
{
text = timeType.Name;
timeSpan = new TimeSpan(0, 0, timeType.Offset);
}
return TimeZoneInfo.CreateCustomTimeZone(id, timeSpan, id, text);
}
return TimeZoneInfo.CreateCustomTimeZone(id, timeSpan, id, text, text2, TimeZoneInfo.ValidateRules(list2).ToArray());
}
// Token: 0x060004D2 RID: 1234 RVA: 0x0001832C File Offset: 0x0001652C
private static List ValidateRules(List adjustmentRules)
{
TimeZoneInfo.AdjustmentRule adjustmentRule = null;
foreach (TimeZoneInfo.AdjustmentRule adjustmentRule2 in adjustmentRules.ToArray())
{
if (adjustmentRule != null && adjustmentRule.DateEnd > adjustmentRule2.DateStart)
{
adjustmentRules.Remove(adjustmentRule2);
}
adjustmentRule = adjustmentRule2;
}
return adjustmentRules;
}
// Token: 0x060004D3 RID: 1235 RVA: 0x00018384 File Offset: 0x00016584
private static Dictionary ParseAbbreviations(byte[] buffer, int index, int count)
{
Dictionary dictionary = new Dictionary();
int num = 0;
StringBuilder stringBuilder = new StringBuilder();
for (int i = 0; i < count; i++)
{
char c = (char)buffer[index + i];
if (c != '\0')
{
stringBuilder.Append(c);
}
else
{
dictionary.Add(num, stringBuilder.ToString());
for (int j = 1; j < stringBuilder.Length; j++)
{
dictionary.Add(num + j, stringBuilder.ToString(j, stringBuilder.Length - j));
}
num = i + 1;
stringBuilder = new StringBuilder();
}
}
return dictionary;
}
// Token: 0x060004D4 RID: 1236 RVA: 0x0001841C File Offset: 0x0001661C
private static Dictionary ParseTimesTypes(byte[] buffer, int index, int count, Dictionary abbreviations)
{
Dictionary dictionary = new Dictionary(count);
for (int i = 0; i < count; i++)
{
int num = TimeZoneInfo.ReadBigEndianInt32(buffer, index + 6 * i);
byte b = buffer[index + 6 * i + 4];
byte b2 = buffer[index + 6 * i + 5];
dictionary.Add(i, new TimeZoneInfo.TimeType(num, b != 0, abbreviations[(int)b2]));
}
return dictionary;
}
// Token: 0x060004D5 RID: 1237 RVA: 0x00018480 File Offset: 0x00016680
private static List> ParseTransitions(byte[] buffer, int index, int count, Dictionary time_types)
{
List> list = new List>(count);
for (int i = 0; i < count; i++)
{
int num = TimeZoneInfo.ReadBigEndianInt32(buffer, index + 4 * i);
DateTime dateTime = TimeZoneInfo.DateTimeFromUnixTime((long)num);
byte b = buffer[index + 4 * count + i];
list.Add(new KeyValuePair(dateTime, time_types[(int)b]));
}
return list;
}
// Token: 0x060004D6 RID: 1238 RVA: 0x000184DC File Offset: 0x000166DC
private static DateTime DateTimeFromUnixTime(long unix_time)
{
DateTime dateTime = new DateTime(1970, 1, 1);
return dateTime.AddSeconds((double)unix_time);
}
// Token: 0x04000124 RID: 292
private const int BUFFER_SIZE = 16384;
// Token: 0x04000125 RID: 293
private TimeSpan baseUtcOffset;
// Token: 0x04000126 RID: 294
private string daylightDisplayName;
// Token: 0x04000127 RID: 295
private string displayName;
// Token: 0x04000128 RID: 296
private string id;
// Token: 0x04000129 RID: 297
private static TimeZoneInfo local;
// Token: 0x0400012A RID: 298
private string standardDisplayName;
// Token: 0x0400012B RID: 299
private bool disableDaylightSavingTime;
// Token: 0x0400012C RID: 300
private static TimeZoneInfo utc;
// Token: 0x0400012D RID: 301
private static string timeZoneDirectory;
// Token: 0x0400012E RID: 302
private TimeZoneInfo.AdjustmentRule[] adjustmentRules;
// Token: 0x0400012F RID: 303
private static List systemTimeZones;
/// Provides information about a time zone adjustment, such as the transition to and from daylight saving time.
/// 2
// Token: 0x02000057 RID: 87
[Serializable]
public sealed class AdjustmentRule : ISerializable, IDeserializationCallback, IEquatable
{
// Token: 0x060004D7 RID: 1239 RVA: 0x00018500 File Offset: 0x00016700
private AdjustmentRule(DateTime dateStart, DateTime dateEnd, TimeSpan daylightDelta, TimeZoneInfo.TransitionTime daylightTransitionStart, TimeZoneInfo.TransitionTime daylightTransitionEnd)
{
if (dateStart.Kind != DateTimeKind.Unspecified || dateEnd.Kind != DateTimeKind.Unspecified)
{
throw new ArgumentException("the Kind property of dateStart or dateEnd parameter does not equal DateTimeKind.Unspecified");
}
if (daylightTransitionStart == daylightTransitionEnd)
{
throw new ArgumentException("daylightTransitionStart parameter cannot equal daylightTransitionEnd parameter");
}
if (dateStart.Ticks % 864000000000L != 0L || dateEnd.Ticks % 864000000000L != 0L)
{
throw new ArgumentException("dateStart or dateEnd parameter includes a time of day value");
}
if (dateEnd < dateStart)
{
throw new ArgumentOutOfRangeException("dateEnd is earlier than dateStart");
}
if (daylightDelta > new TimeSpan(14, 0, 0) || daylightDelta < new TimeSpan(-14, 0, 0))
{
throw new ArgumentOutOfRangeException("daylightDelta is less than -14 or greater than 14 hours");
}
if (daylightDelta.Ticks % 10000000L != 0L)
{
throw new ArgumentOutOfRangeException("daylightDelta parameter does not represent a whole number of seconds");
}
this.dateStart = dateStart;
this.dateEnd = dateEnd;
this.daylightDelta = daylightDelta;
this.daylightTransitionStart = daylightTransitionStart;
this.daylightTransitionEnd = daylightTransitionEnd;
}
/// Gets the date when the adjustment rule ceases to be in effect.
/// A value that indicates the end date of the adjustment rule.
// Token: 0x17000060 RID: 96
// (get) Token: 0x060004D8 RID: 1240 RVA: 0x00018614 File Offset: 0x00016814
public DateTime DateEnd
{
get
{
return this.dateEnd;
}
}
/// Gets the date when the adjustment rule takes effect.
/// A value that indicates when the adjustment rule takes effect.
// Token: 0x17000061 RID: 97
// (get) Token: 0x060004D9 RID: 1241 RVA: 0x0001861C File Offset: 0x0001681C
public DateTime DateStart
{
get
{
return this.dateStart;
}
}
/// Gets the amount of time that is required to form the time zone's daylight saving time. This amount of time is added to the time zone's offset from Coordinated Universal Time (UTC).
/// A object that indicates the amount of time to add to the standard time changes as a result of the adjustment rule.
// Token: 0x17000062 RID: 98
// (get) Token: 0x060004DA RID: 1242 RVA: 0x00018624 File Offset: 0x00016824
public TimeSpan DaylightDelta
{
get
{
return this.daylightDelta;
}
}
/// Gets information about the annual transition from daylight saving time back to standard time.
/// A object that defines the annual transition from daylight saving time back to the time zone's standard time.
// Token: 0x17000063 RID: 99
// (get) Token: 0x060004DB RID: 1243 RVA: 0x0001862C File Offset: 0x0001682C
public TimeZoneInfo.TransitionTime DaylightTransitionEnd
{
get
{
return this.daylightTransitionEnd;
}
}
/// Gets information about the annual transition from standard time to daylight saving time.
/// A object that defines the annual transition from a time zone's standard time to daylight saving time.
// Token: 0x17000064 RID: 100
// (get) Token: 0x060004DC RID: 1244 RVA: 0x00018634 File Offset: 0x00016834
public TimeZoneInfo.TransitionTime DaylightTransitionStart
{
get
{
return this.daylightTransitionStart;
}
}
/// Creates a new adjustment rule for a particular time zone.
/// A object that represents the new adjustment rule.
/// The effective date of the adjustment rule. If the value of the parameter is DateTime.MinValue.Date, this is the first adjustment rule in effect for a time zone.
/// The last date that the adjustment rule is in force. If the value of the parameter is DateTime.MaxValue.Date, the adjustment rule has no end date.
/// The time change that results from the adjustment. This value is added to the time zone's property to obtain the correct daylight offset from Coordinated Universal Time (UTC). This value can range from -14 to 14.
/// A object that defines the start of daylight saving time.
/// A object that defines the end of daylight saving time.
/// The property of the or parameter does not equal .-or-The parameter is equal to the parameter.-or-The or parameter includes a time of day value.
///
/// is earlier than .-or- is less than -14 or greater than 14.-or-The property of the parameter is not equal to 0.-or-The property of the parameter does not equal a whole number of seconds.
// Token: 0x060004DD RID: 1245 RVA: 0x0001863C File Offset: 0x0001683C
public static TimeZoneInfo.AdjustmentRule CreateAdjustmentRule(DateTime dateStart, DateTime dateEnd, TimeSpan daylightDelta, TimeZoneInfo.TransitionTime daylightTransitionStart, TimeZoneInfo.TransitionTime daylightTransitionEnd)
{
return new TimeZoneInfo.AdjustmentRule(dateStart, dateEnd, daylightDelta, daylightTransitionStart, daylightTransitionEnd);
}
/// Determines whether the current object is equal to a second object.
/// true if both objects have equal values; otherwise, false.
/// A second object.
/// 2
// Token: 0x060004DE RID: 1246 RVA: 0x0001864C File Offset: 0x0001684C
public bool Equals(TimeZoneInfo.AdjustmentRule other)
{
return this.dateStart == other.dateStart && this.dateEnd == other.dateEnd && this.daylightDelta == other.daylightDelta && this.daylightTransitionStart == other.daylightTransitionStart && this.daylightTransitionEnd == other.daylightTransitionEnd;
}
/// Serves as a hash function for hashing algorithms and data structures such as hash tables.
/// A 32-bit signed integer that serves as the hash code for the current object.
/// 2
// Token: 0x060004DF RID: 1247 RVA: 0x000186C8 File Offset: 0x000168C8
public override int GetHashCode()
{
return this.dateStart.GetHashCode() ^ this.dateEnd.GetHashCode() ^ this.daylightDelta.GetHashCode() ^ this.daylightTransitionStart.GetHashCode() ^ this.daylightTransitionEnd.GetHashCode();
}
// Token: 0x060004E0 RID: 1248 RVA: 0x00018710 File Offset: 0x00016910
public void GetObjectData(SerializationInfo info, StreamingContext context)
{
throw new NotImplementedException();
}
// Token: 0x060004E1 RID: 1249 RVA: 0x00018718 File Offset: 0x00016918
public void OnDeserialization(object sender)
{
throw new NotImplementedException();
}
// Token: 0x04000130 RID: 304
private DateTime dateEnd;
// Token: 0x04000131 RID: 305
private DateTime dateStart;
// Token: 0x04000132 RID: 306
private TimeSpan daylightDelta;
// Token: 0x04000133 RID: 307
private TimeZoneInfo.TransitionTime daylightTransitionEnd;
// Token: 0x04000134 RID: 308
private TimeZoneInfo.TransitionTime daylightTransitionStart;
}
/// Provides information about a specific time change, such as the change from daylight saving time to standard time or vice versa, in a particular time zone.
/// 2
// Token: 0x02000058 RID: 88
[Serializable]
public struct TransitionTime : ISerializable, IDeserializationCallback, IEquatable
{
// Token: 0x060004E2 RID: 1250 RVA: 0x00018720 File Offset: 0x00016920
private TransitionTime(DateTime timeOfDay, int month, int day)
{
this = new TimeZoneInfo.TransitionTime(timeOfDay, month);
if (day < 1 || day > 31)
{
throw new ArgumentOutOfRangeException("day parameter is less than 1 or greater than 31");
}
this.day = day;
this.isFixedDateRule = true;
}
// Token: 0x060004E3 RID: 1251 RVA: 0x00018760 File Offset: 0x00016960
private TransitionTime(DateTime timeOfDay, int month, int week, DayOfWeek dayOfWeek)
{
this = new TimeZoneInfo.TransitionTime(timeOfDay, month);
if (week < 1 || week > 5)
{
throw new ArgumentOutOfRangeException("week parameter is less than 1 or greater than 5");
}
if (dayOfWeek != DayOfWeek.Sunday && dayOfWeek != DayOfWeek.Monday && dayOfWeek != DayOfWeek.Tuesday && dayOfWeek != DayOfWeek.Wednesday && dayOfWeek != DayOfWeek.Thursday && dayOfWeek != DayOfWeek.Friday && dayOfWeek != DayOfWeek.Saturday)
{
throw new ArgumentOutOfRangeException("dayOfWeek parameter is not a member od DayOfWeek enumeration");
}
this.week = week;
this.dayOfWeek = dayOfWeek;
this.isFixedDateRule = false;
}
// Token: 0x060004E4 RID: 1252 RVA: 0x000187E8 File Offset: 0x000169E8
private TransitionTime(DateTime timeOfDay, int month)
{
if (timeOfDay.Year != 1 || timeOfDay.Month != 1 || timeOfDay.Day != 1)
{
throw new ArgumentException("timeOfDay parameter has a non-default date component");
}
if (timeOfDay.Kind != DateTimeKind.Unspecified)
{
throw new ArgumentException("timeOfDay parameter Kind's property is not DateTimeKind.Unspecified");
}
if (timeOfDay.Ticks % 10000L != 0L)
{
throw new ArgumentException("timeOfDay parameter does not represent a whole number of milliseconds");
}
if (month < 1 || month > 12)
{
throw new ArgumentOutOfRangeException("month parameter is less than 1 or greater than 12");
}
this.timeOfDay = timeOfDay;
this.month = month;
this.week = -1;
this.dayOfWeek = (DayOfWeek)(-1);
this.day = -1;
this.isFixedDateRule = false;
}
/// Gets the hour, minute, and second at which the time change occurs.
/// A value that indicates the time of day at which the time change occurs.
// Token: 0x17000065 RID: 101
// (get) Token: 0x060004E5 RID: 1253 RVA: 0x000188A0 File Offset: 0x00016AA0
public DateTime TimeOfDay
{
get
{
return this.timeOfDay;
}
}
/// Gets the month in which the time change occurs.
/// The month in which the time change occurs.
// Token: 0x17000066 RID: 102
// (get) Token: 0x060004E6 RID: 1254 RVA: 0x000188A8 File Offset: 0x00016AA8
public int Month
{
get
{
return this.month;
}
}
/// Gets the day on which the time change occurs.
/// The day on which the time change occurs.
// Token: 0x17000067 RID: 103
// (get) Token: 0x060004E7 RID: 1255 RVA: 0x000188B0 File Offset: 0x00016AB0
public int Day
{
get
{
return this.day;
}
}
/// Gets the week of the month in which a time change occurs.
/// The week of the month in which the time change occurs.
// Token: 0x17000068 RID: 104
// (get) Token: 0x060004E8 RID: 1256 RVA: 0x000188B8 File Offset: 0x00016AB8
public int Week
{
get
{
return this.week;
}
}
/// Gets the day of the week on which the time change occurs.
/// The day of the week on which the time change occurs.
// Token: 0x17000069 RID: 105
// (get) Token: 0x060004E9 RID: 1257 RVA: 0x000188C0 File Offset: 0x00016AC0
public DayOfWeek DayOfWeek
{
get
{
return this.dayOfWeek;
}
}
/// Gets a value indicating whether the time change occurs at a fixed date and time (such as November 1) or a floating date and time (such as the last Sunday of October).
/// true if the time change rule is fixed-date; false if the time change rule is floating-date.
// Token: 0x1700006A RID: 106
// (get) Token: 0x060004EA RID: 1258 RVA: 0x000188C8 File Offset: 0x00016AC8
public bool IsFixedDateRule
{
get
{
return this.isFixedDateRule;
}
}
/// Defines a time change that uses a fixed-date rule.
/// A object that contains data about the time change.
/// The time at which the time change occurs.
/// The month in which the time change occurs.
/// The day of the month on which the time change occurs.
/// The parameter has a non-default date component.-or-The parameter's property is not .-or-The parameter does not represent a whole number of milliseconds.
/// The parameter is less than 1 or greater than 12.-or-The parameter is less than 1 or greater than 31.
// Token: 0x060004EB RID: 1259 RVA: 0x000188D0 File Offset: 0x00016AD0
public static TimeZoneInfo.TransitionTime CreateFixedDateRule(DateTime timeOfDay, int month, int day)
{
return new TimeZoneInfo.TransitionTime(timeOfDay, month, day);
}
/// Defines a time change that uses a floating-date rule.
/// A object that contains data about the time change.
/// The time at which the time change occurs.
/// The month in which the time change occurs.
/// The week of the month in which the time change occurs.
/// The day of the week on which the time change occurs.
/// The parameter has a non-default date component.-or-The parameter does not represent a whole number of milliseconds.-or-The parameter's property is not .
///
/// is less than 1 or greater than 12.-or- is less than 1 or greater than 5.-or-The parameter is not a member of the enumeration.
// Token: 0x060004EC RID: 1260 RVA: 0x000188DC File Offset: 0x00016ADC
public static TimeZoneInfo.TransitionTime CreateFloatingDateRule(DateTime timeOfDay, int month, int week, DayOfWeek dayOfWeek)
{
return new TimeZoneInfo.TransitionTime(timeOfDay, month, week, dayOfWeek);
}
// Token: 0x060004ED RID: 1261 RVA: 0x000188E8 File Offset: 0x00016AE8
public void GetObjectData(SerializationInfo info, StreamingContext context)
{
throw new NotImplementedException();
}
/// Determines whether an object has identical values to the current object.
/// true if the two objects are equal; otherwise, false.
/// An object to compare with the current object.
/// 2
// Token: 0x060004EE RID: 1262 RVA: 0x000188F0 File Offset: 0x00016AF0
public override bool Equals(object other)
{
return other is TimeZoneInfo.TransitionTime && this == (TimeZoneInfo.TransitionTime)other;
}
/// Determines whether the current object has identical values to a second object.
/// true if the two objects have identical property values; otherwise, false.
/// The second object.
/// 2
// Token: 0x060004EF RID: 1263 RVA: 0x00018910 File Offset: 0x00016B10
public bool Equals(TimeZoneInfo.TransitionTime other)
{
return this == other;
}
/// Serves as a hash function for hashing algorithms and data structures such as hash tables.
/// A 32-bit signed integer that serves as the hash code for this object.
/// 2
// Token: 0x060004F0 RID: 1264 RVA: 0x00018920 File Offset: 0x00016B20
public override int GetHashCode()
{
return this.day ^ (int)this.dayOfWeek ^ this.month ^ (int)this.timeOfDay.Ticks ^ this.week;
}
// Token: 0x060004F1 RID: 1265 RVA: 0x00018958 File Offset: 0x00016B58
public void OnDeserialization(object sender)
{
throw new NotImplementedException();
}
/// Determines whether two specified objects are equal.
/// true if and have identical values; otherwise, false.
/// The first object.
/// The second object.
// Token: 0x060004F2 RID: 1266 RVA: 0x00018960 File Offset: 0x00016B60
public static bool operator ==(TimeZoneInfo.TransitionTime t1, TimeZoneInfo.TransitionTime t2)
{
return t1.day == t2.day && t1.dayOfWeek == t2.dayOfWeek && t1.isFixedDateRule == t2.isFixedDateRule && t1.month == t2.month && t1.timeOfDay == t2.timeOfDay && t1.week == t2.week;
}
/// Determines whether two specified objects are not equal.
/// true if and have any different member values; otherwise, false.
/// The first object.
/// The second object.
// Token: 0x060004F3 RID: 1267 RVA: 0x000189E4 File Offset: 0x00016BE4
public static bool operator !=(TimeZoneInfo.TransitionTime t1, TimeZoneInfo.TransitionTime t2)
{
return !(t1 == t2);
}
// Token: 0x04000135 RID: 309
private DateTime timeOfDay;
// Token: 0x04000136 RID: 310
private int month;
// Token: 0x04000137 RID: 311
private int day;
// Token: 0x04000138 RID: 312
private int week;
// Token: 0x04000139 RID: 313
private DayOfWeek dayOfWeek;
// Token: 0x0400013A RID: 314
private bool isFixedDateRule;
}
// Token: 0x02000059 RID: 89
private struct TimeType
{
// Token: 0x060004F4 RID: 1268 RVA: 0x000189F0 File Offset: 0x00016BF0
public TimeType(int offset, bool is_dst, string abbrev)
{
this.Offset = offset;
this.IsDst = is_dst;
this.Name = abbrev;
}
// Token: 0x060004F5 RID: 1269 RVA: 0x00018A08 File Offset: 0x00016C08
public override string ToString()
{
return string.Concat(new object[] { "offset: ", this.Offset, "s, is_dst: ", this.IsDst, ", zone name: ", this.Name });
}
// Token: 0x0400013B RID: 315
public readonly int Offset;
// Token: 0x0400013C RID: 316
public readonly bool IsDst;
// Token: 0x0400013D RID: 317
public string Name;
}
}
}