Commit 22ec1980 authored by keesschollaart81's avatar keesschollaart81

Updated timestamp to work in regions with an UTC offset

parent 28f00139
......@@ -35,6 +35,7 @@ namespace Cordova.Extension.Commands
public static long ToJavaScriptMilliseconds(this DateTime dt)
{
return (long)dt
.ToUniversalTime()
.Subtract(new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc))
.TotalMilliseconds;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment