|
Il presente articolo è stato tradotto automaticamente. Passare il puntatore sulle frasi nell'articolo per visualizzare il testo originale. Ulteriori informazioni.
|
Traduzione
Originale
|
Classe TimeZoneInfo.AdjustmentRule
Spazio dei nomi: System
Assembly: mscorlib (in mscorlib.dll)
Il tipo TimeZoneInfo.AdjustmentRule espone i seguenti membri.
| Nome | Descrizione | |
|---|---|---|
![]() | DateEnd | |
![]() | DateStart | |
![]() | DaylightDelta | |
![]() | DaylightTransitionEnd | |
![]() | DaylightTransitionStart |
| Nome | Descrizione | |
|---|---|---|
![]() ![]() | CreateAdjustmentRule | |
![]() | Equals(Object) | |
![]() | Equals(TimeZoneInfo.AdjustmentRule) | |
![]() | GetHashCode | |
![]() | GetType | |
![]() | ToString |
| Nome | Descrizione | |
|---|---|---|
![]() ![]() | IDeserializationCallback.OnDeserialization | Infrastruttura. |
![]() ![]() | ISerializable.GetObjectData | Infrastruttura. |
Nota |
|---|
Nota |
|---|
L'attributo HostProtectionAttribute applicato a questo tipo di membro dispone del seguente valore per la proprietà Resources: MayLeakOnAbort. L'oggetto HostProtectionAttribute non influisce sulle applicazioni desktop, che in genere vengono avviate facendo doppio clic sull'icona, digitando un comando oppure immettendo un URL in un browser. Per ulteriori informazioni, vedere la classe HostProtectionAttribute o programmazione per SQL Server e attributi di protezione host. |
private enum WeekOfMonth { First = 1, Second = 2, Third = 3, Fourth = 4, Last = 5, } private static void ShowStartAndEndDates() { // Get all time zones from system ReadOnlyCollection<TimeZoneInfo> timeZones = TimeZoneInfo.GetSystemTimeZones(); string[] monthNames = CultureInfo.CurrentCulture.DateTimeFormat.MonthNames; // Get each time zone foreach (TimeZoneInfo timeZone in timeZones) { TimeZoneInfo.AdjustmentRule[] adjustments = timeZone.GetAdjustmentRules(); // Display message for time zones with no adjustments if (adjustments.Length == 0) { Console.WriteLine("{0} has no adjustment rules", timeZone.StandardName); } else { // Handle time zones with 1 or 2+ adjustments differently bool showCount = false; int ctr = 0; string spacer = ""; Console.WriteLine("{0} Adjustment rules", timeZone.StandardName); if (adjustments.Length > 1) { showCount = true; spacer = " "; } // Iterate adjustment rules foreach (TimeZoneInfo.AdjustmentRule adjustment in adjustments) { if (showCount) { Console.WriteLine(" Adjustment rule #{0}", ctr+1); ctr++; } // Display general adjustment information Console.WriteLine("{0} Start Date: {1:D}", spacer, adjustment.DateStart); Console.WriteLine("{0} End Date: {1:D}", spacer, adjustment.DateEnd); Console.WriteLine("{0} Time Change: {1}:{2:00} hours", spacer, adjustment.DaylightDelta.Hours, adjustment.DaylightDelta.Minutes); // Get transition start information TimeZoneInfo.TransitionTime transitionStart = adjustment.DaylightTransitionStart; Console.Write("{0} Annual Start: ", spacer); if (transitionStart.IsFixedDateRule) { Console.WriteLine("On {0} {1} at {2:t}", monthNames[transitionStart.Month - 1], transitionStart.Day, transitionStart.TimeOfDay); } else { Console.WriteLine("The {0} {1} of {2} at {3:t}", ((WeekOfMonth)transitionStart.Week).ToString(), transitionStart.DayOfWeek.ToString(), monthNames[transitionStart.Month - 1], transitionStart.TimeOfDay); } // Get transition end information TimeZoneInfo.TransitionTime transitionEnd = adjustment.DaylightTransitionEnd; Console.Write("{0} Annual End: ", spacer); if (transitionEnd.IsFixedDateRule) { Console.WriteLine("On {0} {1} at {2:t}", monthNames[transitionEnd.Month - 1], transitionEnd.Day, transitionEnd.TimeOfDay); } else { Console.WriteLine("The {0} {1} of {2} at {3:t}", ((WeekOfMonth)transitionEnd.Week).ToString(), transitionEnd.DayOfWeek.ToString(), monthNames[transitionEnd.Month - 1], transitionEnd.TimeOfDay); } } } Console.WriteLine(); } }
Morocco Standard Time Adjustment rules
Adjustment rule #1
Start Date: Tuesday, January 01, 2008
End Date: Wednesday, December 31, 2008
Time Change: 1:00 hours
Annual Start: The Last Saturday of May at 11:59 PM
Annual End: The Last Sunday of August at 11:59 PM
Adjustment rule #2
Start Date: Thursday, January 01, 2009
End Date: Thursday, December 31, 2009
Time Change: 1:00 hours
Annual Start: The Last Sunday of May at 11:59 PM
Annual End: The Third Thursday of August at 11:59 PM
Coordinated Universal Time has no adjustment rules
GMT Standard Time Adjustment rules
Start Date: Monday, January 01, 0001
End Date: Friday, December 31, 9999
Time Change: 1:00 hours
Annual Start: The Last Sunday of March at 1:00 AM
Annual End: The Last Sunday of October at 2:00 AM
Greenwich Standard Time has no adjustment rules
W. Europe Standard Time Adjustment rules
Start Date: Monday, January 01, 0001
End Date: Friday, December 31, 9999
Time Change: 1:00 hours
Annual Start: The Last Sunday of March at 2:00 AM
Annual End: The Last Sunday of October at 3:00 AM
Central Europe Standard Time Adjustment rules
Start Date: Monday, January 01, 0001
End Date: Friday, December 31, 9999
Time Change: 1:00 hours
Annual Start: The Last Sunday of March at 2:00 AM
Annual End: The Last Sunday of October at 3:00 AM
Romance Standard Time Adjustment rules
Start Date: Monday, January 01, 0001
End Date: Friday, December 31, 9999
Time Change: 1:00 hours
Annual Start: The Last Sunday of March at 2:00 AM
Annual End: The Last Sunday of October at 3:00 AM
Central European Standard Time Adjustment rules
Start Date: Monday, January 01, 0001
End Date: Friday, December 31, 9999
Time Change: 1:00 hours
Annual Start: The Last Sunday of March at 2:00 AM
Annual End: The Last Sunday of October at 3:00 AM
W. Central Africa Standard Time has no adjustment rules
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (ruoli di base del server non supportati), Windows Server 2008 R2 (ruoli di base del server supportati con SP1 o versione successiva, Itanium non supportato)
.NET Framework non supporta tutte le versioni di ciascuna piattaforma. Per un elenco delle versioni supportate, vedere Requisiti di sistema di .NET Framework.
