3
3
4
4
using System ;
5
5
using System . Globalization ;
6
+ using System . Runtime . InteropServices ;
6
7
using Xunit ;
7
8
8
9
public static class TimeZoneInfoTests
@@ -20,8 +21,8 @@ public static class TimeZoneInfoTests
20
21
private static String s_strRussian = s_isWindows ? "Russian Standard Time" : "Europe/Moscow" ;
21
22
private static String s_strLibya = s_isWindows ? "Libya Standard Time" : "Africa/Tripoli" ;
22
23
private static String s_strCatamarca = s_isWindows ? "Argentina Standard Time" : "America/Catamarca" ;
23
- private static String s_strLisbon = Interop . IsWindows ? "GMT Standard Time" : "Europe/Lisbon" ;
24
- private static String s_strNewfoundland = Interop . IsWindows ? "Newfoundland Standard Time" : "America/St_Johns" ;
24
+ private static String s_strLisbon = s_isWindows ? "GMT Standard Time" : "Europe/Lisbon" ;
25
+ private static String s_strNewfoundland = s_isWindows ? "Newfoundland Standard Time" : "America/St_Johns" ;
25
26
26
27
private static TimeZoneInfo s_myUtc = TimeZoneInfo . Utc ;
27
28
private static TimeZoneInfo s_myLocal = TimeZoneInfo . Local ;
@@ -38,7 +39,7 @@ public static class TimeZoneInfoTests
38
39
private static bool s_localSupportsDST = TimeZoneInfo . Local . SupportsDaylightSavingTime ;
39
40
40
41
// In 2006, Australia delayed ending DST by a week. However, Windows says it still ended the last week of March.
41
- private static readonly int s_sydneyOffsetLastWeekOfMarch2006 = Interop . IsWindows ? 10 : 11 ;
42
+ private static readonly int s_sydneyOffsetLastWeekOfMarch2006 = s_isWindows ? 10 : 11 ;
42
43
43
44
[ Fact ]
44
45
public static void TestKind ( )
@@ -340,7 +341,7 @@ public static void NearMinMaxDateTimeConvertTest()
340
341
DateTime utcMinValue = DateTime . SpecifyKind ( DateTime . MinValue , DateTimeKind . Utc ) ;
341
342
VerifyConvert ( utcMinValue , s_strPacific , DateTime . MinValue ) ;
342
343
343
- if ( Interop . IsWindows )
344
+ if ( s_isWindows )
344
345
{
345
346
VerifyConvert ( utcMinValue . AddHours ( 8 ) , s_strPacific , DateTime . MinValue ) ;
346
347
VerifyConvert ( utcMinValue . AddHours ( 8.5 ) , s_strPacific , DateTime . MinValue . AddHours ( 0.5 ) ) ;
@@ -450,7 +451,7 @@ public static void PerthRulesTest()
450
451
451
452
time1utc = new DateTime ( 2006 , 12 , 31 , 15 , 59 , 59 , DateTimeKind . Utc ) ;
452
453
time1 = new DateTime ( 2006 , 12 , 31 , 15 , 59 , 59 ) ;
453
- if ( Interop . IsWindows )
454
+ if ( s_isWindows )
454
455
{
455
456
// ambiguous time between rules
456
457
// this is not ideal, but the way it works
0 commit comments