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)
8484 . MaxStatements ( jintSettings . MaxStatements )
8585 . Strict ( jintSettings . StrictMode )
8686 . TimeoutInterval ( jintSettings . TimeoutInterval )
87+ . LocalTimeZone ( jintSettings . LocalTimeZone ?? TimeZoneInfo . Local )
8788 ) ;
8889 }
8990 catch ( Exception e )
Original file line number Diff line number Diff line change @@ -74,6 +74,15 @@ public TimeSpan TimeoutInterval
7474 set ;
7575 }
7676
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+
7786
7887 /// <summary>
7988 /// Constructs an instance of the Jint settings
@@ -86,6 +95,7 @@ public JintSettings()
8695 MaxStatements = 0 ;
8796 StrictMode = false ;
8897 TimeoutInterval = TimeSpan . Zero ;
98+ LocalTimeZone = TimeZoneInfo . Local ;
8999 }
90100 }
91101}
You can’t perform that action at this time.
0 commit comments