1
Vote

DateTime issue

description

I have the following javascript code:
$format($.dt, "G");
and execute Jint like this:
var engine = new Engine();
engine.SetValue("$format", new Func<object, string, string>(Format));
engine.SetValue("$", new { dt = DateTime.Now });
engine.Execute(jscode);
When I execute it I get dt value less than the real DateTime.Now (timezone shift) in my .net Format method.
How to fix that?

comments