File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
src/JavaScriptEngineSwitcher.Jint Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ public JintJsEngine(JintSettings settings)
84
84
. MaxStatements ( jintSettings . MaxStatements )
85
85
. Strict ( jintSettings . StrictMode )
86
86
. TimeoutInterval ( jintSettings . TimeoutInterval )
87
+ . LocalTimeZone ( jintSettings . LocalTimeZone ?? TimeZoneInfo . Local )
87
88
) ;
88
89
}
89
90
catch ( Exception e )
Original file line number Diff line number Diff line change @@ -74,6 +74,15 @@ public TimeSpan TimeoutInterval
74
74
set ;
75
75
}
76
76
77
+ /// <summary>
78
+ /// Gets or sets the local timezone for the dates in the script
79
+ /// </summary>
80
+ public TimeZoneInfo LocalTimeZone
81
+ {
82
+ get ;
83
+ set ;
84
+ }
85
+
77
86
78
87
/// <summary>
79
88
/// Constructs an instance of the Jint settings
@@ -86,6 +95,7 @@ public JintSettings()
86
95
MaxStatements = 0 ;
87
96
StrictMode = false ;
88
97
TimeoutInterval = TimeSpan . Zero ;
98
+ LocalTimeZone = TimeZoneInfo . Local ;
89
99
}
90
100
}
91
101
}
You can’t perform that action at this time.
0 commit comments