1596 lines
79 KiB
C#
1596 lines
79 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.IO;
|
|
using System.Runtime.Serialization;
|
|
using System.Text;
|
|
|
|
namespace System
|
|
{
|
|
/// <summary>Represents any time zone in the world.</summary>
|
|
// Token: 0x02000056 RID: 86
|
|
[Serializable]
|
|
public sealed class TimeZoneInfo : ISerializable, IDeserializationCallback, IEquatable<TimeZoneInfo>
|
|
{
|
|
// 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;
|
|
}
|
|
|
|
/// <summary>Gets the time difference between the current time zone's standard time and Coordinated Universal Time (UTC).</summary>
|
|
/// <returns>A <see cref="T:System.TimeSpan" /> object that indicates the time difference between the current time zone's standard time and Coordinated Universal Time (UTC).</returns>
|
|
// Token: 0x17000057 RID: 87
|
|
// (get) Token: 0x0600049F RID: 1183 RVA: 0x00017160 File Offset: 0x00015360
|
|
public TimeSpan BaseUtcOffset
|
|
{
|
|
get
|
|
{
|
|
return this.baseUtcOffset;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the localized display name for the current time zone's daylight saving time.</summary>
|
|
/// <returns>The display name for the time zone's localized daylight saving time.</returns>
|
|
// 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the localized general display name that represents the time zone.</summary>
|
|
/// <returns>The time zone's localized general display name.</returns>
|
|
// Token: 0x17000059 RID: 89
|
|
// (get) Token: 0x060004A1 RID: 1185 RVA: 0x00017184 File Offset: 0x00015384
|
|
public string DisplayName
|
|
{
|
|
get
|
|
{
|
|
return this.displayName;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the time zone identifier.</summary>
|
|
/// <returns>The time zone identifier.</returns>
|
|
// Token: 0x1700005A RID: 90
|
|
// (get) Token: 0x060004A2 RID: 1186 RVA: 0x0001718C File Offset: 0x0001538C
|
|
public string Id
|
|
{
|
|
get
|
|
{
|
|
return this.id;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets a <see cref="T:System.TimeZoneInfo" /> object that represents the local time zone.</summary>
|
|
/// <returns>A <see cref="T:System.TimeZoneInfo" /> object that represents the local time zone.</returns>
|
|
// 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the localized display name for the time zone's standard time.</summary>
|
|
/// <returns>The localized display name of the time zone's standard time.</returns>
|
|
// Token: 0x1700005C RID: 92
|
|
// (get) Token: 0x060004A4 RID: 1188 RVA: 0x00017234 File Offset: 0x00015434
|
|
public string StandardName
|
|
{
|
|
get
|
|
{
|
|
return this.standardDisplayName;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets a value indicating whether the time zone has any daylight saving time rules.</summary>
|
|
/// <returns>true if the time zone supports daylight saving time; otherwise, false.</returns>
|
|
// Token: 0x1700005D RID: 93
|
|
// (get) Token: 0x060004A5 RID: 1189 RVA: 0x0001723C File Offset: 0x0001543C
|
|
public bool SupportsDaylightSavingTime
|
|
{
|
|
get
|
|
{
|
|
return !this.disableDaylightSavingTime;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets a <see cref="T:System.TimeZoneInfo" /> object that represents the Coordinated Universal Time (UTC) zone.</summary>
|
|
/// <returns>A <see cref="T:System.TimeZoneInfo" /> object that represents the Coordinated Universal Time (UTC) zone.</returns>
|
|
// 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>Clears cached time zone data.</summary>
|
|
/// <filterpriority>2</filterpriority>
|
|
// Token: 0x060004A9 RID: 1193 RVA: 0x000172A8 File Offset: 0x000154A8
|
|
public static void ClearCachedData()
|
|
{
|
|
TimeZoneInfo.local = null;
|
|
TimeZoneInfo.utc = null;
|
|
TimeZoneInfo.systemTimeZones = null;
|
|
}
|
|
|
|
/// <summary>Converts a time to the time in a particular time zone.</summary>
|
|
/// <returns>A <see cref="T:System.DateTime" /> value that represents the date and time in the destination time zone.</returns>
|
|
/// <param name="dateTime">The date and time to convert. </param>
|
|
/// <param name="destinationTimeZone">The time zone to convert <paramref name="dateTime" /> to.</param>
|
|
/// <exception cref="T:System.ArgumentException">The value of the <paramref name="dateTime" /> parameter represents an invalid time.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">The value of the <paramref name="destinationTimeZone" /> parameter is null.</exception>
|
|
// Token: 0x060004AA RID: 1194 RVA: 0x000172BC File Offset: 0x000154BC
|
|
public static DateTime ConvertTime(DateTime dateTime, TimeZoneInfo destinationTimeZone)
|
|
{
|
|
return TimeZoneInfo.ConvertTime(dateTime, TimeZoneInfo.Local, destinationTimeZone);
|
|
}
|
|
|
|
/// <summary>Converts a time from one time zone to another.</summary>
|
|
/// <returns>A <see cref="T:System.DateTime" /> value that represents the date and time in the destination time zone that corresponds to the <paramref name="dateTime" /> parameter in the source time zone.</returns>
|
|
/// <param name="dateTime">The date and time to convert.</param>
|
|
/// <param name="sourceTimeZone">The time zone of <paramref name="dateTime" />.</param>
|
|
/// <param name="destinationTimeZone">The time zone to convert <paramref name="dateTime" /> to.</param>
|
|
/// <exception cref="T:System.ArgumentException">The <see cref="P:System.DateTime.Kind" /> property of the <paramref name="dateTime" /> parameter is <see cref="F:System.DateTimeKind.Local" />, but the <paramref name="sourceTimeZone" /> parameter does not equal <see cref="F:System.DateTimeKind.Local" />.-or-The <see cref="P:System.DateTime.Kind" /> property of the <paramref name="dateTime" /> parameter is <see cref="F:System.DateTimeKind.Utc" />, but the <paramref name="sourceTimeZone" /> parameter does not equal <see cref="P:System.TimeZoneInfo.Utc" />.-or-The <paramref name="dateTime" /> parameter is an invalid time (that is, it represents a time that does not exist because of a time zone's adjustment rules).</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="sourceTimeZone" /> parameter is null.-or-The <paramref name="destinationTimeZone" /> parameter is null.</exception>
|
|
// 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);
|
|
}
|
|
|
|
/// <summary>Converts a time to the time in a particular time zone.</summary>
|
|
/// <returns>A <see cref="T:System.DateTimeOffset" /> value that represents the date and time in the destination time zone.</returns>
|
|
/// <param name="dateTimeOffset">The date and time to convert. </param>
|
|
/// <param name="destinationTimeZone">The time zone to convert <paramref name="dateTime" /> to.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">The value of the <paramref name="destinationTimeZone" /> parameter is null.</exception>
|
|
// Token: 0x060004AC RID: 1196 RVA: 0x00017398 File Offset: 0x00015598
|
|
public static DateTimeOffset ConvertTime(DateTimeOffset dateTimeOffset, TimeZoneInfo destinationTimeZone)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
/// <summary>Converts a time to the time in another time zone based on the time zone's identifier.</summary>
|
|
/// <returns>A <see cref="T:System.DateTime" /> value that represents the date and time in the destination time zone.</returns>
|
|
/// <param name="dateTime">The date and time to convert.</param>
|
|
/// <param name="destinationTimeZoneId">The identifier of the destination time zone.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="destinationTimeZoneId" /> is null.</exception>
|
|
/// <exception cref="T:System.InvalidTimeZoneException">The time zone identifier was found, but the registry data is corrupted.</exception>
|
|
/// <exception cref="T:System.Security.SecurityException">The process does not have the permissions required to read from the registry key that contains the time zone information.</exception>
|
|
/// <exception cref="T:System.TimeZoneNotFoundException">The <paramref name="destinationTimeZoneId" /> identifier was not found on the local system.</exception>
|
|
// Token: 0x060004AD RID: 1197 RVA: 0x000173A0 File Offset: 0x000155A0
|
|
public static DateTime ConvertTimeBySystemTimeZoneId(DateTime dateTime, string destinationTimeZoneId)
|
|
{
|
|
return TimeZoneInfo.ConvertTime(dateTime, TimeZoneInfo.FindSystemTimeZoneById(destinationTimeZoneId));
|
|
}
|
|
|
|
/// <summary>Converts a time from one time zone to another based on time zone identifiers.</summary>
|
|
/// <returns>A <see cref="T:System.DateTime" /> value that represents the date and time in the destination time zone that corresponds to the <paramref name="dateTime" /> parameter in the source time zone.</returns>
|
|
/// <param name="dateTime">The date and time to convert.</param>
|
|
/// <param name="sourceTimeZoneId">The identifier of the source time zone. </param>
|
|
/// <param name="destinationTimeZoneId">The identifier of the destination time zone.</param>
|
|
/// <exception cref="T:System.ArgumentException">The <see cref="P:System.DateTime.Kind" /> property of the <paramref name="dateTime" /> parameter does not correspond to the source time zone.-or-<paramref name="dateTime" /> is an invalid time in the source time zone.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="sourceTimeZoneId" /> is null.-or-<paramref name="destinationTimeZoneId" /> is null.</exception>
|
|
/// <exception cref="T:System.InvalidTimeZoneException">The time zone identifier was found, but the registry data is corrupted.</exception>
|
|
/// <exception cref="T:System.Security.SecurityException">The process does not have the permissions required to read from the registry key that contains the time zone information.</exception>
|
|
/// <exception cref="T:System.TimeZoneNotFoundException">The <paramref name="sourceTimeZoneId" /> identifier was not found on the local system.-or-The <paramref name="destinationTimeZoneId" /> identifier was not found on the local system.</exception>
|
|
/// <exception cref="T:System.Security.SecurityException">The user does not have the permissions required to read from the registry keys that hold time zone data.</exception>
|
|
// 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));
|
|
}
|
|
|
|
/// <summary>Converts a time to the time in another time zone based on the time zone's identifier.</summary>
|
|
/// <returns>A <see cref="T:System.DateTimeOffset" /> value that represents the date and time in the destination time zone.</returns>
|
|
/// <param name="dateTimeOffset">The date and time to convert.</param>
|
|
/// <param name="destinationTimeZoneId">The identifier of the destination time zone.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="destinationTimeZoneId" /> is null.</exception>
|
|
/// <exception cref="T:System.InvalidTimeZoneException">The time zone identifier was found but the registry data is corrupted.</exception>
|
|
/// <exception cref="T:System.Security.SecurityException">The process does not have the permissions required to read from the registry key that contains the time zone information.</exception>
|
|
/// <exception cref="T:System.TimeZoneNotFoundException">The <paramref name="destinationTimeZoneId" /> identifier was not found on the local system.</exception>
|
|
// 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);
|
|
}
|
|
|
|
/// <summary>Converts a Coordinated Universal Time (UTC) to the time in a specified time zone.</summary>
|
|
/// <returns>A <see cref="T:System.DateTime" /> value that represents the date and time in the destination time zone. Its <see cref="P:System.DateTime.Kind" /> property is <see cref="F:System.DateTimeKind.Utc" /> if <paramref name="destinationTimeZone" /> is <see cref="P:System.TimeZoneInfo.Utc" />; otherwise, its <see cref="P:System.DateTime.Kind" /> property is <see cref="F:System.DateTimeKind.Unspecified" />.</returns>
|
|
/// <param name="dateTime">The Coordinated Universal Time (UTC).</param>
|
|
/// <param name="destinationTimeZone">The time zone to convert <paramref name="dateTime" /> to.</param>
|
|
/// <exception cref="T:System.ArgumentException">The <see cref="P:System.DateTime.Kind" /> property of <paramref name="dateTime" /> is <see cref="F:System.DateTimeKind.Local" />.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="destinationTimeZone" /> is null.</exception>
|
|
// 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);
|
|
}
|
|
|
|
/// <summary>Converts the current date and time to Coordinated Universal Time (UTC).</summary>
|
|
/// <returns>A <see cref="T:System.DateTime" /> value that represents the Coordinated Universal Time (UTC) that corresponds to the <paramref name="dateTime" /> parameter. The <see cref="T:System.DateTime" /> value's <see cref="P:System.DateTime.Kind" /> property is always set to <see cref="F:System.DateTimeKind.Utc" />.</returns>
|
|
/// <param name="dateTime">The date and time to convert.</param>
|
|
/// <exception cref="T:System.ArgumentException">TimeZoneInfo.Local.IsInvalidDateTime(<paramref name="dateTime" />) returns true.</exception>
|
|
// 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);
|
|
}
|
|
|
|
/// <summary>Converts the time in a specified time zone to Coordinated Universal Time (UTC).</summary>
|
|
/// <returns>A <see cref="T:System.DateTime" /> object that represents the Coordinated Universal Time (UTC) that corresponds to the <paramref name="dateTime" /> parameter. The <see cref="T:System.DateTime" /> object's <see cref="P:System.DateTime.Kind" /> property is always set to <see cref="F:System.DateTimeKind.Utc" />.</returns>
|
|
/// <param name="dateTime">The date and time to convert.</param>
|
|
/// <param name="sourceTimeZone">The time zone of <paramref name="dateTime" />.</param>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="dateTime" />.Kind is <see cref="F:System.DateTimeKind.Utc" /> and <paramref name="sourceTimeZone" /> does not equal <see cref="P:System.TimeZoneInfo.Utc" />.-or-<paramref name="dateTime" />.Kind is <see cref="F:System.DateTimeKind.Local" /> and <paramref name="sourceTimeZone" /> does not equal <see cref="P:System.TimeZoneInfo.Local" />.-or-<paramref name="sourceTimeZone" />.IsInvalidDateTime(<paramref name="dateTime" />) returns true.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="sourceTimeZone" /> is null.</exception>
|
|
// 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);
|
|
}
|
|
|
|
/// <summary>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.</summary>
|
|
/// <returns>A <see cref="T:System.TimeZoneInfo" /> object that represents the new time zone.</returns>
|
|
/// <param name="id">The time zone's identifier.</param>
|
|
/// <param name="baseUtcOffset">A <see cref="T:System.TimeSpan" /> object that represents the time difference between this time zone and Coordinated Universal Time (UTC).</param>
|
|
/// <param name="displayName">The display name of the new time zone. </param>
|
|
/// <param name="standardDisplayName">The name of the new time zone's standard time.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="id" /> parameter is null.</exception>
|
|
/// <exception cref="T:System.ArgumentException">The <paramref name="id" /> parameter is an empty string ("").-or-The <paramref name="baseUtcOffset" /> parameter does not represent a whole number of minutes.</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="baseUtcOffset" /> parameter is greater than 14 hours or less than -14 hours.</exception>
|
|
/// <filterpriority>2</filterpriority>
|
|
// 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);
|
|
}
|
|
|
|
/// <summary>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.</summary>
|
|
/// <returns>A <see cref="T:System.TimeZoneInfo" /> object that represents the new time zone.</returns>
|
|
/// <param name="id">The time zone's identifier.</param>
|
|
/// <param name="baseUtcOffset">A <see cref="T:System.TimeSpan" /> object that represents the time difference between this time zone and Coordinated Universal Time (UTC).</param>
|
|
/// <param name="displayName">The display name of the new time zone. </param>
|
|
/// <param name="standardDisplayName">The new time zone's standard time name.</param>
|
|
/// <param name="daylightDisplayName">The daylight saving time name of the new time zone. </param>
|
|
/// <param name="adjustmentRules">An array of <see cref="T:System.TimeZoneInfo.AdjustmentRule" /> objects that augment the base UTC offset for a particular period. </param>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="id" /> parameter is null.</exception>
|
|
/// <exception cref="T:System.ArgumentException">The <paramref name="id" /> parameter is an empty string ("").-or-The <paramref name="baseUtcOffset" /> parameter does not represent a whole number of minutes.</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="baseUtcOffset" /> parameter is greater than 14 hours or less than -14 hours.</exception>
|
|
/// <exception cref="T:System.InvalidTimeZoneException">The adjustment rules specified in the <paramref name="adjustmentRules" /> parameter overlap.-or-The adjustment rules specified in the <paramref name="adjustmentRules" /> parameter are not in chronological order.-or-One or more elements in <paramref name="adjustmentRules" /> are null.-or-A date can have multiple adjustment rules applied to it.-or-The sum of the <paramref name="baseUtcOffset" /> parameter and the <see cref="P:System.TimeZoneInfo.AdjustmentRule.DaylightDelta" /> value of one or more objects in the <paramref name="adjustmentRules" /> array is greater than 14 hours or less than -14 hours.</exception>
|
|
/// <filterpriority>2</filterpriority>
|
|
// 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);
|
|
}
|
|
|
|
/// <summary>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.</summary>
|
|
/// <returns>A <see cref="T:System.TimeZoneInfo" /> object that represents the new time zone. If the <paramref name="disableDaylightSavingTime" /> parameter is true, the returned object has no daylight saving time data.</returns>
|
|
/// <param name="id">The time zone's identifier.</param>
|
|
/// <param name="baseUtcOffset">A <see cref="T:System.TimeSpan" /> object that represents the time difference between this time zone and Coordinated Universal Time (UTC).</param>
|
|
/// <param name="displayName">The display name of the new time zone. </param>
|
|
/// <param name="standardDisplayName">The standard time name of the new time zone.</param>
|
|
/// <param name="daylightDisplayName">The daylight saving time name of the new time zone. </param>
|
|
/// <param name="adjustmentRules">An array of <see cref="T:System.TimeZoneInfo.AdjustmentRule" /> objects that augment the base UTC offset for a particular period.</param>
|
|
/// <param name="disableDaylightSavingTime">true to discard any daylight saving time-related information present in <paramref name="adjustmentRules" /> with the new object; otherwise, false.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="id" /> parameter is null.</exception>
|
|
/// <exception cref="T:System.ArgumentException">The <paramref name="id" /> parameter is an empty string ("").-or-The <paramref name="baseUtcOffset" /> parameter does not represent a whole number of minutes.</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="baseUtcOffset" /> parameter is greater than 14 hours or less than -14 hours.</exception>
|
|
/// <exception cref="T:System.InvalidTimeZoneException">The adjustment rules specified in the <paramref name="adjustmentRules" /> parameter overlap.-or-The adjustment rules specified in the <paramref name="adjustmentRules" /> parameter are not in chronological order.-or-One or more elements in <paramref name="adjustmentRules" /> are null.-or-A date can have multiple adjustment rules applied to it.-or-The sum of the <paramref name="baseUtcOffset" /> parameter and the <see cref="P:System.TimeZoneInfo.AdjustmentRule.DaylightDelta" /> value of one or more objects in the <paramref name="adjustmentRules" /> array is greater than 14 hours or less than -14 hours.</exception>
|
|
/// <filterpriority>2</filterpriority>
|
|
// 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);
|
|
}
|
|
|
|
/// <summary>Determines whether the current <see cref="T:System.TimeZoneInfo" /> object and another <see cref="T:System.TimeZoneInfo" /> object are equal.</summary>
|
|
/// <returns>true if the two <see cref="T:System.TimeZoneInfo" /> objects are equal; otherwise, false.</returns>
|
|
/// <param name="other">A second <see cref="T:System.TimeZoneInfo" /> object to compare with the current <see cref="T:System.TimeZoneInfo" /> object. </param>
|
|
/// <filterpriority>2</filterpriority>
|
|
// Token: 0x060004B7 RID: 1207 RVA: 0x000175E8 File Offset: 0x000157E8
|
|
public bool Equals(TimeZoneInfo other)
|
|
{
|
|
return other != null && other.Id == this.Id && this.HasSameRules(other);
|
|
}
|
|
|
|
/// <summary>Retrieves a <see cref="T:System.TimeZoneInfo" /> object from the registry based on its identifier.</summary>
|
|
/// <returns>A <see cref="T:System.TimeZoneInfo" /> object whose identifier is the value of the <paramref name="id" /> parameter.</returns>
|
|
/// <param name="id">The time zone identifier, which corresponds to the <see cref="P:System.TimeZoneInfo.Id" /> property. </param>
|
|
/// <exception cref="T:System.OutOfMemoryException">The system does not have enough memory to hold information about the time zone.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="id" /> parameter is null.</exception>
|
|
/// <exception cref="T:System.TimeZoneNotFoundException">The time zone identifier specified by <paramref name="id" /> was not found. This means that a registry key whose name matches <paramref name="id" /> does not exist, or that the key exists but does not contain any time zone data.</exception>
|
|
/// <exception cref="T:System.Security.SecurityException">The process does not have the permissions required to read from the registry key that contains the time zone information.</exception>
|
|
/// <exception cref="T:System.InvalidTimeZoneException">The time zone identifier was found, but the registry data is corrupted.</exception>
|
|
// 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;
|
|
}
|
|
|
|
/// <summary>Deserializes a string to re-create an original serialized <see cref="T:System.TimeZoneInfo" /> object.</summary>
|
|
/// <returns>A <see cref="T:System.TimeZoneInfo" /> object.</returns>
|
|
/// <param name="source">The string representation of the serialized <see cref="T:System.TimeZoneInfo" /> object. </param>
|
|
/// <exception cref="T:System.ArgumentException">The <paramref name="source" /> parameter is <see cref="F:System.String.Empty" />.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="source" /> parameter is a null string.</exception>
|
|
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The source parameter cannot be deserialized back into a <see cref="T:System.TimeZoneInfo" /> object.</exception>
|
|
// Token: 0x060004BA RID: 1210 RVA: 0x00017718 File Offset: 0x00015918
|
|
public static TimeZoneInfo FromSerializedString(string source)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
/// <summary>Retrieves an array of <see cref="T:System.TimeZoneInfo.AdjustmentRule" /> objects that apply to the current <see cref="T:System.TimeZoneInfo" /> object.</summary>
|
|
/// <returns>An array of <see cref="T:System.TimeZoneInfo.AdjustmentRule" /> objects for this time zone.</returns>
|
|
/// <exception cref="T:System.OutOfMemoryException">The system does not have enough memory to make an in-memory copy of the adjustment rules.</exception>
|
|
/// <filterpriority>2</filterpriority>
|
|
// 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();
|
|
}
|
|
|
|
/// <summary>Returns information about the possible dates and times that an ambiguous date and time can be mapped to.</summary>
|
|
/// <returns>An array of <see cref="T:System.TimeSpan" /> objects that represents possible Coordinated Universal Time (UTC) offsets that a particular date and time can be mapped to.</returns>
|
|
/// <param name="dateTime">A date and time.</param>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="dateTime" /> is not an ambiguous time.</exception>
|
|
/// <filterpriority>2</filterpriority>
|
|
// 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
|
|
};
|
|
}
|
|
|
|
/// <summary>Returns information about the possible dates and times that an ambiguous date and time can be mapped to.</summary>
|
|
/// <returns>An array of <see cref="T:System.TimeSpan" /> objects that represents possible Coordinated Universal Time (UTC) offsets that a particular date and time can be mapped to.</returns>
|
|
/// <param name="dateTimeOffset">A date and time.</param>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="dateTime" /> is not an ambiguous time.</exception>
|
|
/// <filterpriority>2</filterpriority>
|
|
// 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();
|
|
}
|
|
|
|
/// <summary>Serves as a hash function for hashing algorithms and data structures such as hash tables.</summary>
|
|
/// <returns>A 32-bit signed integer that serves as the hash code for this <see cref="T:System.TimeZoneInfo" /> object.</returns>
|
|
/// <filterpriority>2</filterpriority>
|
|
// 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();
|
|
}
|
|
|
|
/// <summary>Returns a sorted collection of all the time zones about which information is available on the local system.</summary>
|
|
/// <returns>A read-only collection of <see cref="T:System.TimeZoneInfo" /> objects.</returns>
|
|
/// <exception cref="T:System.OutOfMemoryException">There is insufficient memory to store all time zone information.</exception>
|
|
/// <exception cref="T:System.Security.SecurityException">The user does not have permission to read from the registry keys that contain time zone information.</exception>
|
|
// Token: 0x060004C0 RID: 1216 RVA: 0x00017820 File Offset: 0x00015A20
|
|
public static ReadOnlyCollection<TimeZoneInfo> GetSystemTimeZones()
|
|
{
|
|
if (TimeZoneInfo.systemTimeZones == null)
|
|
{
|
|
TimeZoneInfo.systemTimeZones = new List<TimeZoneInfo>();
|
|
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>(TimeZoneInfo.systemTimeZones);
|
|
}
|
|
|
|
/// <summary>Calculates the offset or difference between the time in this time zone and Coordinated Universal Time (UTC) for a particular date and time.</summary>
|
|
/// <returns>A <see cref="T:System.TimeSpan" /> object that indicates the time difference between the two time zones.</returns>
|
|
/// <param name="dateTime">The date and time to determine the offset for. </param>
|
|
// 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;
|
|
}
|
|
|
|
/// <summary>Calculates the offset or difference between the time in this time zone and Coordinated Universal Time (UTC) for a particular date and time.</summary>
|
|
/// <returns>A <see cref="T:System.TimeSpan" /> object that indicates the time difference between Coordinated Universal Time (UTC) and the current time zone.</returns>
|
|
/// <param name="dateTimeOffset">The date and time to determine the offset for.</param>
|
|
// Token: 0x060004C2 RID: 1218 RVA: 0x00017A24 File Offset: 0x00015C24
|
|
public TimeSpan GetUtcOffset(DateTimeOffset dateTimeOffset)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
/// <summary>Indicates whether the current object and another <see cref="T:System.TimeZoneInfo" /> object have the same adjustment rules.</summary>
|
|
/// <returns>true if the two time zones have identical adjustment rules and an identical base offset; otherwise, false.</returns>
|
|
/// <param name="other">A second <see cref="T:System.TimeZoneInfo" /> object to compare with the current <see cref="T:System.TimeZoneInfo" /> object. </param>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="other" /> parameter is null.</exception>
|
|
// 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;
|
|
}
|
|
|
|
/// <summary>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.</summary>
|
|
/// <returns>true if the <paramref name="dateTime" /> parameter is ambiguous; otherwise, false.</returns>
|
|
/// <param name="dateTime">A date and time value. </param>
|
|
/// <exception cref="T:System.ArgumentException">The <see cref="P:System.DateTime.Kind" /> property of the <paramref name="dateTime" /> value is <see cref="F:System.DateTimeKind.Local" /> and <paramref name="dateTime" /> is an invalid time.</exception>
|
|
/// <filterpriority>2</filterpriority>
|
|
// 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;
|
|
}
|
|
|
|
/// <summary>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.</summary>
|
|
/// <returns>true if the <paramref name="dateTimeOffset" /> parameter is ambiguous in the current time zone; otherwise, false.</returns>
|
|
/// <param name="dateTimeOffset">A date and time.</param>
|
|
/// <filterpriority>2</filterpriority>
|
|
// Token: 0x060004C5 RID: 1221 RVA: 0x00017B94 File Offset: 0x00015D94
|
|
public bool IsAmbiguousTime(DateTimeOffset dateTimeOffset)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
/// <summary>Indicates whether a specified date and time falls in the range of daylight saving time for the time zone of the current <see cref="T:System.TimeZoneInfo" /> object.</summary>
|
|
/// <returns>true if the <paramref name="dateTime" /> parameter is a daylight saving time; otherwise, false.</returns>
|
|
/// <param name="dateTime">A date and time value. </param>
|
|
/// <exception cref="T:System.ArgumentException">The <see cref="P:System.DateTime.Kind" /> property of the <paramref name="dateTime" /> value is <see cref="F:System.DateTimeKind.Local" /> and <paramref name="dateTime" /> is an invalid time.</exception>
|
|
// 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;
|
|
}
|
|
|
|
/// <summary>Indicates whether a specified date and time falls in the range of daylight saving time for the time zone of the current <see cref="T:System.TimeZoneInfo" /> object.</summary>
|
|
/// <returns>true if the <paramref name="dateTimeOffset" /> parameter is a daylight saving time; otherwise, false.</returns>
|
|
/// <param name="dateTimeOffset">A date and time value.</param>
|
|
// Token: 0x060004C7 RID: 1223 RVA: 0x00017CF0 File Offset: 0x00015EF0
|
|
public bool IsDaylightSavingTime(DateTimeOffset dateTimeOffset)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
/// <summary>Indicates whether a particular date and time is invalid.</summary>
|
|
/// <returns>true if <paramref name="dateTime" /> is invalid; otherwise, false.</returns>
|
|
/// <param name="dateTime">A date and time value. </param>
|
|
/// <filterpriority>2</filterpriority>
|
|
// 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();
|
|
}
|
|
|
|
/// <summary>Converts the current <see cref="T:System.TimeZoneInfo" /> object to a serialized string.</summary>
|
|
/// <returns>A string that represents the current <see cref="T:System.TimeZoneInfo" /> object.</returns>
|
|
// Token: 0x060004CA RID: 1226 RVA: 0x00017D78 File Offset: 0x00015F78
|
|
public string ToSerializedString()
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
/// <summary>Returns the current <see cref="T:System.TimeZoneInfo" /> object's display name.</summary>
|
|
/// <returns>The value of the <see cref="P:System.TimeZoneInfo.DisplayName" /> property of the current <see cref="T:System.TimeZoneInfo" /> object.</returns>
|
|
// 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<int, string> dictionary = TimeZoneInfo.ParseAbbreviations(buffer, 44 + 4 * num4 + num4 + 6 * num5, num6);
|
|
Dictionary<int, TimeZoneInfo.TimeType> dictionary2 = TimeZoneInfo.ParseTimesTypes(buffer, 44 + 4 * num4 + num4, num5, dictionary);
|
|
List<KeyValuePair<DateTime, TimeZoneInfo.TimeType>> 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<TimeZoneInfo.AdjustmentRule> list2 = new List<TimeZoneInfo.AdjustmentRule>();
|
|
for (int i = 0; i < list.Count; i++)
|
|
{
|
|
KeyValuePair<DateTime, TimeZoneInfo.TimeType> 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<TimeZoneInfo.AdjustmentRule>();
|
|
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<TimeZoneInfo.AdjustmentRule> ValidateRules(List<TimeZoneInfo.AdjustmentRule> 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<int, string> ParseAbbreviations(byte[] buffer, int index, int count)
|
|
{
|
|
Dictionary<int, string> dictionary = new Dictionary<int, string>();
|
|
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<int, TimeZoneInfo.TimeType> ParseTimesTypes(byte[] buffer, int index, int count, Dictionary<int, string> abbreviations)
|
|
{
|
|
Dictionary<int, TimeZoneInfo.TimeType> dictionary = new Dictionary<int, TimeZoneInfo.TimeType>(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<KeyValuePair<DateTime, TimeZoneInfo.TimeType>> ParseTransitions(byte[] buffer, int index, int count, Dictionary<int, TimeZoneInfo.TimeType> time_types)
|
|
{
|
|
List<KeyValuePair<DateTime, TimeZoneInfo.TimeType>> list = new List<KeyValuePair<DateTime, TimeZoneInfo.TimeType>>(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, TimeZoneInfo.TimeType>(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<TimeZoneInfo> systemTimeZones;
|
|
|
|
/// <summary>Provides information about a time zone adjustment, such as the transition to and from daylight saving time.</summary>
|
|
/// <filterpriority>2</filterpriority>
|
|
// Token: 0x02000057 RID: 87
|
|
[Serializable]
|
|
public sealed class AdjustmentRule : ISerializable, IDeserializationCallback, IEquatable<TimeZoneInfo.AdjustmentRule>
|
|
{
|
|
// 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;
|
|
}
|
|
|
|
/// <summary>Gets the date when the adjustment rule ceases to be in effect.</summary>
|
|
/// <returns>A <see cref="T:System.DateTime" /> value that indicates the end date of the adjustment rule.</returns>
|
|
// Token: 0x17000060 RID: 96
|
|
// (get) Token: 0x060004D8 RID: 1240 RVA: 0x00018614 File Offset: 0x00016814
|
|
public DateTime DateEnd
|
|
{
|
|
get
|
|
{
|
|
return this.dateEnd;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the date when the adjustment rule takes effect.</summary>
|
|
/// <returns>A <see cref="T:System.DateTime" /> value that indicates when the adjustment rule takes effect.</returns>
|
|
// Token: 0x17000061 RID: 97
|
|
// (get) Token: 0x060004D9 RID: 1241 RVA: 0x0001861C File Offset: 0x0001681C
|
|
public DateTime DateStart
|
|
{
|
|
get
|
|
{
|
|
return this.dateStart;
|
|
}
|
|
}
|
|
|
|
/// <summary>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).</summary>
|
|
/// <returns>A <see cref="T:System.TimeSpan" /> object that indicates the amount of time to add to the standard time changes as a result of the adjustment rule.</returns>
|
|
// Token: 0x17000062 RID: 98
|
|
// (get) Token: 0x060004DA RID: 1242 RVA: 0x00018624 File Offset: 0x00016824
|
|
public TimeSpan DaylightDelta
|
|
{
|
|
get
|
|
{
|
|
return this.daylightDelta;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets information about the annual transition from daylight saving time back to standard time.</summary>
|
|
/// <returns>A <see cref="T:System.TimeZoneInfo.TransitionTime" /> object that defines the annual transition from daylight saving time back to the time zone's standard time.</returns>
|
|
// Token: 0x17000063 RID: 99
|
|
// (get) Token: 0x060004DB RID: 1243 RVA: 0x0001862C File Offset: 0x0001682C
|
|
public TimeZoneInfo.TransitionTime DaylightTransitionEnd
|
|
{
|
|
get
|
|
{
|
|
return this.daylightTransitionEnd;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets information about the annual transition from standard time to daylight saving time.</summary>
|
|
/// <returns>A <see cref="T:System.TimeZoneInfo.TransitionTime" /> object that defines the annual transition from a time zone's standard time to daylight saving time.</returns>
|
|
// Token: 0x17000064 RID: 100
|
|
// (get) Token: 0x060004DC RID: 1244 RVA: 0x00018634 File Offset: 0x00016834
|
|
public TimeZoneInfo.TransitionTime DaylightTransitionStart
|
|
{
|
|
get
|
|
{
|
|
return this.daylightTransitionStart;
|
|
}
|
|
}
|
|
|
|
/// <summary>Creates a new adjustment rule for a particular time zone.</summary>
|
|
/// <returns>A <see cref="T:System.TimeZoneInfo.AdjustmentRule" /> object that represents the new adjustment rule.</returns>
|
|
/// <param name="dateStart">The effective date of the adjustment rule. If the value of the <paramref name="dateStart" /> parameter is DateTime.MinValue.Date, this is the first adjustment rule in effect for a time zone. </param>
|
|
/// <param name="dateEnd">The last date that the adjustment rule is in force. If the value of the <paramref name="dateEnd" /> parameter is DateTime.MaxValue.Date, the adjustment rule has no end date.</param>
|
|
/// <param name="daylightDelta">The time change that results from the adjustment. This value is added to the time zone's <see cref="P:System.TimeZoneInfo.BaseUtcOffset" /> property to obtain the correct daylight offset from Coordinated Universal Time (UTC). This value can range from -14 to 14. </param>
|
|
/// <param name="daylightTransitionStart">A <see cref="T:System.TimeZoneInfo.TransitionTime" /> object that defines the start of daylight saving time.</param>
|
|
/// <param name="daylightTransitionEnd">A <see cref="T:System.TimeZoneInfo.TransitionTime" /> object that defines the end of daylight saving time. </param>
|
|
/// <exception cref="T:System.ArgumentException">The <see cref="P:System.DateTime.Kind" /> property of the <paramref name="dateStart" /> or <paramref name="dateEnd" /> parameter does not equal <see cref="F:System.DateTimeKind.Unspecified" />.-or-The <paramref name="daylightTransitionStart" /> parameter is equal to the <paramref name="daylightTransitionEnd" /> parameter.-or-The <paramref name="dateStart" /> or <paramref name="dateEnd" /> parameter includes a time of day value.</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="dateEnd" /> is earlier than <paramref name="dateStart" />.-or-<paramref name="daylightDelta" /> is less than -14 or greater than 14.-or-The <see cref="P:System.TimeSpan.Milliseconds" /> property of the <paramref name="daylightDelta" /> parameter is not equal to 0.-or-The <see cref="P:System.TimeSpan.Ticks" /> property of the <paramref name="daylightDelta" /> parameter does not equal a whole number of seconds.</exception>
|
|
// 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);
|
|
}
|
|
|
|
/// <summary>Determines whether the current <see cref="T:System.TimeZoneInfo.AdjustmentRule" /> object is equal to a second <see cref="T:System.TimeZoneInfo.AdjustmentRule" /> object.</summary>
|
|
/// <returns>true if both <see cref="T:System.TimeZoneInfo.AdjustmentRule" /> objects have equal values; otherwise, false.</returns>
|
|
/// <param name="other">A second <see cref="T:System.TimeZoneInfo.AdjustmentRule" /> object.</param>
|
|
/// <filterpriority>2</filterpriority>
|
|
// 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;
|
|
}
|
|
|
|
/// <summary>Serves as a hash function for hashing algorithms and data structures such as hash tables.</summary>
|
|
/// <returns>A 32-bit signed integer that serves as the hash code for the current <see cref="T:System.TimeZoneInfo.AdjustmentRule" /> object.</returns>
|
|
/// <filterpriority>2</filterpriority>
|
|
// 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;
|
|
}
|
|
|
|
/// <summary>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.</summary>
|
|
/// <filterpriority>2</filterpriority>
|
|
// Token: 0x02000058 RID: 88
|
|
[Serializable]
|
|
public struct TransitionTime : ISerializable, IDeserializationCallback, IEquatable<TimeZoneInfo.TransitionTime>
|
|
{
|
|
// 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;
|
|
}
|
|
|
|
/// <summary>Gets the hour, minute, and second at which the time change occurs.</summary>
|
|
/// <returns>A <see cref="T:System.DateTime" /> value that indicates the time of day at which the time change occurs.</returns>
|
|
// Token: 0x17000065 RID: 101
|
|
// (get) Token: 0x060004E5 RID: 1253 RVA: 0x000188A0 File Offset: 0x00016AA0
|
|
public DateTime TimeOfDay
|
|
{
|
|
get
|
|
{
|
|
return this.timeOfDay;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the month in which the time change occurs.</summary>
|
|
/// <returns>The month in which the time change occurs.</returns>
|
|
// Token: 0x17000066 RID: 102
|
|
// (get) Token: 0x060004E6 RID: 1254 RVA: 0x000188A8 File Offset: 0x00016AA8
|
|
public int Month
|
|
{
|
|
get
|
|
{
|
|
return this.month;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the day on which the time change occurs.</summary>
|
|
/// <returns>The day on which the time change occurs.</returns>
|
|
// Token: 0x17000067 RID: 103
|
|
// (get) Token: 0x060004E7 RID: 1255 RVA: 0x000188B0 File Offset: 0x00016AB0
|
|
public int Day
|
|
{
|
|
get
|
|
{
|
|
return this.day;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the week of the month in which a time change occurs.</summary>
|
|
/// <returns>The week of the month in which the time change occurs.</returns>
|
|
// Token: 0x17000068 RID: 104
|
|
// (get) Token: 0x060004E8 RID: 1256 RVA: 0x000188B8 File Offset: 0x00016AB8
|
|
public int Week
|
|
{
|
|
get
|
|
{
|
|
return this.week;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the day of the week on which the time change occurs.</summary>
|
|
/// <returns>The day of the week on which the time change occurs.</returns>
|
|
// Token: 0x17000069 RID: 105
|
|
// (get) Token: 0x060004E9 RID: 1257 RVA: 0x000188C0 File Offset: 0x00016AC0
|
|
public DayOfWeek DayOfWeek
|
|
{
|
|
get
|
|
{
|
|
return this.dayOfWeek;
|
|
}
|
|
}
|
|
|
|
/// <summary>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).</summary>
|
|
/// <returns>true if the time change rule is fixed-date; false if the time change rule is floating-date.</returns>
|
|
// Token: 0x1700006A RID: 106
|
|
// (get) Token: 0x060004EA RID: 1258 RVA: 0x000188C8 File Offset: 0x00016AC8
|
|
public bool IsFixedDateRule
|
|
{
|
|
get
|
|
{
|
|
return this.isFixedDateRule;
|
|
}
|
|
}
|
|
|
|
/// <summary>Defines a time change that uses a fixed-date rule.</summary>
|
|
/// <returns>A <see cref="T:System.TimeZoneInfo.TransitionTime" /> object that contains data about the time change.</returns>
|
|
/// <param name="timeOfDay">The time at which the time change occurs.</param>
|
|
/// <param name="month">The month in which the time change occurs.</param>
|
|
/// <param name="day">The day of the month on which the time change occurs.</param>
|
|
/// <exception cref="T:System.ArgumentException">The <paramref name="timeOfDay" /> parameter has a non-default date component.-or-The <paramref name="timeOfDay" /> parameter's <see cref="P:System.DateTime.Kind" /> property is not <see cref="F:System.DateTimeKind.Unspecified" />.-or-The <paramref name="timeOfDay" /> parameter does not represent a whole number of milliseconds.</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="month" /> parameter is less than 1 or greater than 12.-or-The <paramref name="day" /> parameter is less than 1 or greater than 31.</exception>
|
|
// 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);
|
|
}
|
|
|
|
/// <summary>Defines a time change that uses a floating-date rule.</summary>
|
|
/// <returns>A <see cref="T:System.TimeZoneInfo.TransitionTime" /> object that contains data about the time change.</returns>
|
|
/// <param name="timeOfDay">The time at which the time change occurs.</param>
|
|
/// <param name="month">The month in which the time change occurs.</param>
|
|
/// <param name="week">The week of the month in which the time change occurs.</param>
|
|
/// <param name="dayOfWeek">The day of the week on which the time change occurs.</param>
|
|
/// <exception cref="T:System.ArgumentException">The <paramref name="timeOfDay" /> parameter has a non-default date component.-or-The <paramref name="timeOfDay" /> parameter does not represent a whole number of milliseconds.-or-The <paramref name="timeOfDay" /> parameter's <see cref="P:System.DateTime.Kind" /> property is not <see cref="F:System.DateTimeKind.Unspecified" />.</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="month" /> is less than 1 or greater than 12.-or-<paramref name="week" /> is less than 1 or greater than 5.-or-The <paramref name="dayOfWeek" /> parameter is not a member of the <see cref="T:System.DayOfWeek" /> enumeration.</exception>
|
|
// 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();
|
|
}
|
|
|
|
/// <summary>Determines whether an object has identical values to the current <see cref="T:System.TimeZoneInfo.TransitionTime" /> object.</summary>
|
|
/// <returns>true if the two objects are equal; otherwise, false.</returns>
|
|
/// <param name="obj">An object to compare with the current <see cref="T:System.TimeZoneInfo.TransitionTime" /> object. </param>
|
|
/// <filterpriority>2</filterpriority>
|
|
// Token: 0x060004EE RID: 1262 RVA: 0x000188F0 File Offset: 0x00016AF0
|
|
public override bool Equals(object other)
|
|
{
|
|
return other is TimeZoneInfo.TransitionTime && this == (TimeZoneInfo.TransitionTime)other;
|
|
}
|
|
|
|
/// <summary>Determines whether the current <see cref="T:System.TimeZoneInfo.TransitionTime" /> object has identical values to a second <see cref="T:System.TimeZoneInfo.TransitionTime" /> object.</summary>
|
|
/// <returns>true if the two objects have identical property values; otherwise, false.</returns>
|
|
/// <param name="other">The second <see cref="T:System.TimeZoneInfo.TransitionTime" /> object. </param>
|
|
/// <filterpriority>2</filterpriority>
|
|
// Token: 0x060004EF RID: 1263 RVA: 0x00018910 File Offset: 0x00016B10
|
|
public bool Equals(TimeZoneInfo.TransitionTime other)
|
|
{
|
|
return this == other;
|
|
}
|
|
|
|
/// <summary>Serves as a hash function for hashing algorithms and data structures such as hash tables.</summary>
|
|
/// <returns>A 32-bit signed integer that serves as the hash code for this <see cref="T:System.TimeZoneInfo.TransitionTime" /> object.</returns>
|
|
/// <filterpriority>2</filterpriority>
|
|
// 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();
|
|
}
|
|
|
|
/// <summary>Determines whether two specified <see cref="T:System.TimeZoneInfo.TransitionTime" /> objects are equal.</summary>
|
|
/// <returns>true if <paramref name="left" /> and <paramref name="right" /> have identical values; otherwise, false.</returns>
|
|
/// <param name="left">The first <see cref="T:System.TimeZoneInfo.TransitionTime" /> object.</param>
|
|
/// <param name="right">The second <see cref="T:System.TimeZoneInfo.TransitionTime" /> object.</param>
|
|
// 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;
|
|
}
|
|
|
|
/// <summary>Determines whether two specified <see cref="T:System.TimeZoneInfo.TransitionTime" /> objects are not equal.</summary>
|
|
/// <returns>true if <paramref name="left" /> and <paramref name="right" /> have any different member values; otherwise, false.</returns>
|
|
/// <param name="left">The first <see cref="T:System.TimeZoneInfo.TransitionTime" /> object.</param>
|
|
/// <param name="right">The second <see cref="T:System.TimeZoneInfo.TransitionTime" /> object.</param>
|
|
// 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;
|
|
}
|
|
}
|
|
}
|