Browse Source

add offset check

Brian Beard 11 years ago
parent
commit
a09eb75095
1 changed files with 4 additions and 13 deletions
  1. 4 13
      Jint.Tests/Runtime/EngineTests.cs

+ 4 - 13
Jint.Tests/Runtime/EngineTests.cs

@@ -741,13 +741,6 @@ namespace Jint.Tests.Runtime
         [Fact]
         public void ParseShouldReturnNumber()
         {
-            
-
-            RunTest(@"
-                var d = Date.parse('1970-01-01'); 
-                assert(d === 0);
-            ");
-
             var engine = new Engine();
 
             var result = engine.Execute("Date.parse('1970-01-01');").GetCompletionValue().AsNumber();
@@ -757,12 +750,10 @@ namespace Jint.Tests.Runtime
         [Fact]
         public void UtcShouldUseUtc()
         {
-            
-
-            RunTest(@"
-                var d = Date.UTC(1970,0,1); 
-                assert(d === 0);
-            ");
+            if (TimeZoneInfo.Local.BaseUtcOffset.Equals(new TimeSpan(0)))
+            {
+                throw new Exception("Test is not valid if the Local timezone offset is the same as UTC.");
+            }
 
             var engine = new Engine();